Reference

CLI environment variables

Every environment variable the Envless CLI reads, in one place: machine credentials, target selection, and the switches that change output.

The CLI reads a small, fixed set of environment variables. Some of them are how a machine authenticates when there is no browser to log in with; the rest change behaviour or output and are useful when you are scripting. This page collects all of them, because otherwise each one is only mentioned on whichever command page happens to need it.

Machine credentials

These three exist so a CI runner, container or production host can read variables without an interactive login. See Production and CI for how they fit together.

VariablePurpose
ENVLESS_TOKENThe machine identity. Holds an ev_sk_ key created on the Keys page. Puts the CLI into machine mode, which reads through the public API. Authenticates the fetch and decrypts nothing.
ENVLESS_KEYThe base64url raw AES-256 workspace key, exported from Settings, CI / Machine Access. Used locally and never sent. Prefer this on machines: it skips key derivation entirely.
ENVLESS_PASSPHRASEThe workspace passphrase, as an alternative to ENVLESS_KEY. The CLI derives the key locally the same way it would interactively, which costs one PBKDF2 pass per run.

ENVLESS_TOKEN on its own reads nothing. Machine mode aborts unless ENVLESS_KEY or ENVLESS_PASSPHRASE is also present, so a leaked token by itself does not decrypt a single value. Supply exactly one of the two decryption credentials.

Choosing a target

These stand in for a committed .envless file, and they lose to explicit flags. Resolution order for each is the flag first, then the environment variable, then the .envless file.

VariablePurpose
ENVLESS_PRODUCTProduct slug. Only needed when the same project slug exists in more than one product.
ENVLESS_PROJECTProject slug or unique id.
ENVLESS_ENVEnvironment slug, or a comma-separated list. run and build merge a list into one process, later winning a name collision. sync writes one file per entry instead.

These three names, along with the credentials above, are refused by envless push if they appear in a .env file you are importing. They boot envless itself rather than your app, so storing them as project variables would be circular.

Output and behaviour switches

VariableEffect
NO_COLORSet to any value, including an empty string, and every command drops ANSI colour. Follows the no-color.org convention.
FORCE_COLORSet to 0 to drop colour. Any other value is left to the terminal detection below.
ENVLESS_NO_UPDATE_CHECKDisables the background check for a newer CLI version on npm. Worth setting in CI, where the check is wasted work.
ENVLESS_NO_INSECURE_CACHE_WARNINGSuppresses the warning printed when the on-disk cache directory has permissions looser than expected. Silence it only when you know why the permissions differ.
ENVLESS_VERBOSETurns on verbose diagnostic output. Useful when a command fails and the message alone is not enough.

Without either colour variable set, the CLI colours output when stdout or stderr is a TTY and stays plain otherwise, so piping into a file or a CI log already strips escape codes without any configuration.

The switches are read as boolean-ish: presence is what matters for NO_COLOR, while FORCE_COLOR is compared against the exact string 0. When in doubt, set them to 1 or leave them unset.

A CI block that sets everything

bash
export ENVLESS_TOKEN=ev_sk_xxxxxxxxxxxx
export ENVLESS_KEY=xxxxxxxxxxxx
export ENVLESS_PROJECT=billing-api
export ENVLESS_ENV=production
export ENVLESS_NO_UPDATE_CHECK=1
export NO_COLOR=1

envless run -- npm start

With those set, no .envless file is required and no command prompts for anything, which is exactly what you want inside a container image or a pipeline step.

Going deeper

Where these variables get used in practice.