Dotenvx Environment Variables
www.dotenv.org
2
Leaving SiteNav
External Link Disclaimer
You are about to visit www.dotenv.org. This website is not operated by us. We are not responsible for its content or privacy practices.
About this website
Dotenvx is an environment variable manager that loads configuration from .env files into process environment variables while adding encryption, cross-platform compatibility, and multiple environment support to the original dotenv library that established the .env file convention across the JavaScript ecosystem. The tool reads .env files line by line, parsing key-value pairs with support for multiline values, variable interpolation where values can reference previously defined variables, and quoted strings with escape sequences. The encryption feature addresses the biggest security flaw of plaintext .env files: secrets committed to version control or exposed on developer machines are readable by anyone with file access. Dotenvx encrypts the .env file using a private key, producing an .env.keys file that stores the decryption keys separately, so the encrypted .env can be safely committed to Git while the key file remains on developers machines or in a secret manager. The private key never leaves the developer machine, and the encrypted file can be decrypted at runtime through the DOTENV_PRIVATE_KEY environment variable set in the deployment environment. Multiple environments are supported through named sections within a single encrypted file, so development, staging, and production secrets coexist in one file with separate keys for each environment. The CLI runs on macOS, Linux, and Windows through npm, Homebrew, and a standalone binary. A drop-in replacement for dotenv, the package has the same API for loading variables into process.env, meaning existing code requires no changes to upgrade from plaintext to encrypted secrets. The original dotenv library has over twenty million weekly npm downloads and remains available as the classic option.
Statistics
2
Views
0
Clicks
0
Like
0
Dislike