Commands
Generate, validate, and use your Envfile.
Usage
dotenvx spec
dotenvx check
dotenvx encrypt
dotenvx run -- node index.js
dotenvx spec creates an Envfile with strict true and variable declarations, without copying secret values. In a terminal, it lets you select env files and scan code for references. Use -f .env.production to select one file, --stdout to preview the result, or --overwrite to replace an existing Envfile and its custom rules.
Use dotenvx check -f .env.production to validate a specific file and its overrides. See the quickstart for a complete example.
Related