Star on GitHub - 5.8k

Bash

Encrypt a .env file in Bash with dotenvx, commit it safely, and inject its secrets at runtime.

Install

Get the Dotenvx CLI.

$ curl -sfS https://dotenvx.sh | sh

Encrypt

Encrypt your .env file.

$ dotenvx encrypt

Inject

Then inject your encrypted secrets at runtime with dotenvx run.
$ dotenvx run --quiet -- sh -c 'echo Hello $HELLO'