Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.envless.cloud/llms.txt

Use this file to discover all available pages before exploring further.

envless run decrypts your variables and launches a child process with them set in the environment. No files are written, no imports added, and the variables disappear when the process exits.

Basic usage

envless run -- npm start
envless run -- node server.js
envless run -- python manage.py runserver

Anything after -- is the command to run. Envless populates the child’s environment, execs the command, and forwards its exit code.

Picking an environment

envless run --env production -- node server.js
envless run --env staging,development -- npm test

If you’ve linked multiple environments and don’t pass --env, the first one in .envless is used (with a warning).

In package.json

Wrap your existing scripts so teammates don’t have to think about it:

{
    "scripts": {
        "dev": "envless run -- next dev",
        "start": "envless run --env production -- next start",
        "test": "envless run --env test -- vitest"
    }
}

When to pick run over the other modes

https://mintcdn.com/envless-7b88c948/9f3dXE0TchC0LVM7/assets/icons/duotone/play.svg?fit=max&auto=format&n=9f3dXE0TchC0LVM7&q=85&s=1b9a1a8808e0e2bb20fdee60c707d2b1

Use run

You want one-shot injection, nothing persisted, works with any language.
https://mintcdn.com/envless-7b88c948/9f3dXE0TchC0LVM7/assets/icons/duotone/code.svg?fit=max&auto=format&n=9f3dXE0TchC0LVM7&q=85&s=fbd6ab5160f56cd28bd3af2bff1550eb

Use runtime

Node/Bun/Edge apps where you want typed env.X and no CLI step at runtime.
https://mintcdn.com/envless-7b88c948/nR8RUPgNBtCF5SFI/assets/icons/duotone/arrows-clockwise.svg?fit=max&auto=format&n=nR8RUPgNBtCF5SFI&q=85&s=ff30102213f867347e249a1dad40e5d4

Use sync

You need .env.<slug> files for Docker, Rails, Python, or shell scripts.

CI / production

The same command works in CI — provide a personal access key instead of a cached login:

export ENVLESS_TOKEN=ev_live_xxxxxxxxxxxx
envless run --env production -- node server.js

See CI/CD & Production for full setups.

What it does under the hood

1

Read .envless

Same binding file used by sync and the runtime import.
2

Fetch + decrypt

Uses the cached key (or ENVLESS_TOKEN) to pull and decrypt the bundle.
3

Spawn the child with env populated

Real process.env from the parent shell is preserved; Envless values are added without overwriting anything already set.
4

Forward signals and exit code

SIGINT / SIGTERM are forwarded so Ctrl-C works. The parent exits with the child’s code.

Notes

  • Variables are never written to disk.
  • The child sees them via standard process.env.
  • envless run exits non-zero if the bundle can’t be fetched or decrypted — fail fast in CI.