/ Search - type / Modes - type M Star on GitHub - 5.7k

Encrypt your secrets. Ship them with your code.

Dotenvx is docker for secrets From the creator of dotenv 20.5k

Encrypt

$ echo "HELLO=Secret" > .env
$ dotenvx encrypt
◈ encrypted (.env)

Encrypt your secrets in .env files. The values become encrypted text, while the variable names stay readable. Only your private key can unlock the secrets.

Commit

HELLO=encrypted:BAgYNmJ3PV9+aajRwCh1Wx...
$ git add .env
$ git commit -m "Add encrypted secrets"

Commit your encrypted .env alongside your code. Share secrets through git, but keep your private key out of the repository.

Ship

$ dotenvx run -- node index.js
⟐ injected env (2) from .env

Ship your code and encrypted secrets together. Your deployment supplies the private key so Dotenvx can unlock your secrets at runtime. Where do I put the private key?

Built on three foundational primitives.

Git for distribution, .env for secrets storage, and secp256k1 for encryption. Dotenvx is open source, with over 200 million installs, and comes from the creator of dotenv.

Read the whitepaper →

See how it feels for yourself.

Encrypt, Commit, and Ship, and keep your private key out of git. Try the whole workflow locally before changing how you deploy.

Encrypt your first .env file →

Once your secrets are in an encrypted git workflow, you'll wonder why you waited so long. It just feels so good.

Install