dotenvx CLI

dotenvx is an environment-variable CLI that encrypts project configuration; the application needs a decryption key to load it.

  • 5,880 ★ on the repository
  • Last commit
  • BSD-3-Clause
CLI

Extended access

Why this level

  • The CLI decrypts secrets and passes them to the child process; output protection does not constrain that process’s authority.
All reasons and checks

dotenvx/dotenvx

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add cli/dotenvx

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The CLI decrypts secrets and passes them to the child process; output protection does not constrain that process’s authority.

This is third-party code. Review the repository files before installing.

What it does

dotenvx is a CLI that encrypts environment values and decrypts them when an application starts. Ciphertext can be versioned with the project while private keys stay separate in the runtime environment. The CLI can launch programs in different languages. Users select environment files and loading precedence. Agent CLI examples include output redaction, while the launched process still receives real secrets and must be trusted to use them.

Who it is for. Application delivery engineers versioning encrypted configuration while distributing runtime keys separately.

Good fit when

  • Several environments need configuration tied to the project version.
  • An application needs language-independent environment loading.
  • New values should be encrypted with an existing public key.
  • A CLI agent may use task secrets but should not echo their values in ordinary output.

Not a fit when

  • The private key would be stored in the same repository without separate protection.
  • The launched program must never access plaintext values.
  • Output redaction is being treated as full network and filesystem isolation.

Example request

Prepare dotenvx for a test application: describe key storage and env-file precedence. Do not expose or commit real secrets.

Limitations

Decryption requires the private key; ciphertext alone cannot restore the application environment. Keep keys separate from published env files and include them in a secure recovery plan. Output redaction does not hide values from the child process, so agent permissions and network access require separate controls. Existing environment variables win by default when files are loaded; changing precedence requires the explicit overload mode.

How to disable. Restore the application’s previous environment-loading method before uninstalling. Verify recovery of needed environments before removing keys.

FAQ

What does encrypt put in the env file?

The variable values are replaced with ciphertext.

How do I launch with variables?

The Node.js example uses `dotenvx run -- node index.js`. After the separator, put the application command that should receive the variables.

Can I encrypt without a private key?

Yes. A fresh file can use an existing public key with `--with`. Decryption still needs the private key.

Does redaction hide secrets from the agent?

No. The process receives real values; redaction masks output. Restrict agent access separately.

Why did an env value not replace an existing variable?

Existing variables take precedence. `--overload` changes that order; use it when file values should replace the current environment.

Discussion

No questions or reviews yet.

CLI tools

A skill and CLI around .env.schema: the agent sees variable names, types and rules while secret values never reach its context

SkillExtended access5KRepository stars

Vahta lets an agent use your passwords and API keys from an encrypted vault without ever showing it the values

CLIBroad access71Repository stars

EnvLatch keeps API keys in the macOS Keychain and gives a command only the environment variables you pick, with no .env files

CLIBroad access99Repository stars

A wrapper over the 1Password CLI: agents find, use and save secrets without seeing the values, and ask for approval less often

CLIBroad access326Repository stars

A utility keeps keys in the system keychain and injects them at the transport layer, so the agent never sees a value.

CLIBroad access197Repository stars

Lade hands a command secrets and private-network access only while it runs, then removes it, for humans and agents alike

CLIBroad access136Repository stars

README in short

The package also works as a JavaScript library. CLI examples cover several installation methods and separate environment files.

README badge

Report a problem