From the creator of dotenv 20.5k
Dotenvx
Designed as a secure dotenv. You can encrypt your .env files–and more.
Encrypt your .env
$ echo "HELLO=World" > .env
$ dotenvx encrypt
◈ encrypted (.env)
Commit it safely
HELLO=encrypted:BAgYNmJ3PV9+aajRwCh1Wx...
$ git add .env
$ git commit -m "add encrypted env"
Decrypt at runtime
$ echo "console.log('Hello ' + process.env.HELLO)" > index.js
$ dotenvx run -- node index.js
⟐ injected env (2) from .env
Hello World
Features
- Make .env safe to commit
- Password protect your .env file
- Store keys in your OS keychain
- Same on Mac, Linux, and Windows
- Ship the right secrets to each environment
- Let agents use secrets without spilling them
- Catch missing keys before you run
- Protect your team from secret leaks
- Give .env live, computed values
- Pull secrets remotely from places like 1Password
- and more