A secure dotenv, from the creator of dotenv
open coreBSD-3-Clauseself-hostablefree
dotenvx is a CLI and library from the creator of dotenv that encrypts the values in .env files so they can be committed to git with the code. dotenvx encrypt turns each value into ciphertext using secp256k1 public-key encryption and keeps the private key in .env.keys (or the macOS Keychain, Windows Credential Manager, Linux Secret Service, 1Password or Bitwarden), and dotenvx run -- <command> decrypts and injects the variables at runtime, so it works with any language or framework; production uses its own encrypted file and key. It can stop plaintext secrets being committed and has SDKs for Node.js, Python, Ruby, Rust and PHP. Dotenvx Armor, its paid hosted service, keeps private keys off developer machines with managed key custody, human approval before a key is used (including by AI agents), access rules and audit logs.
Problems it solves
- commit our .env file to git without exposing the secrets in it
- stop developers from committing plaintext secrets
- share environment variables with the team without pasting them into Slack
- load .env files for any language, not just Node.js
- separate production secrets from development ones in the repo
- require a human to approve before an AI agent can use a production secret
- keep private keys off developer laptops and audit who used them
- a drop-in replacement for dotenv with encryption
Features
- encrypt .env values with secp256k1
- run any command with decrypted env vars injected
- separate files and keys per environment
- keys in .env.keys, OS keychains, 1Password or Bitwarden
- leak prevention for plaintext secrets
- SDKs for Node.js, Python, Ruby, Rust and PHP
- Armor managed key custody (paid)
- human approvals and audit logs (Armor)
Ways to run it
dotenvx (open source)
Only in this edition
- CLI and SDKs
- keys you manage yourself
Not included
- managed key custody, approvals and audit logs
You arrange
- somewhere safe for the private keys
Dotenvx Armor
Member $5/month, Business $90/month13
Only in this edition
- managed key custody
- human approvals
- audit logs
Capabilities
| Has an API | plan not known |
|---|---|
| Has a command line tool | plan not known |
| Has official SDKs | plan not known |
Alternatives
The same job
These do what dotenvx does.
- Doppler Secrets management platform for teams and infrastructure
- SOPS Simple and flexible tool for managing secrets
- git-crypt Transparent file encryption in git
- Infisical Open-source platform for secrets, certificates and privileged access
- Sealed Secrets A Kubernetes controller and tool for one-way encrypted Secrets
