Open source
rustenv
Inspect, validate and encrypt .env files from the terminal
About
rustenv is a command line tool to inspect, compare, validate and export .env files. It masks values such as keys, passwords and tokens by default. It can merge files, create a .env from a template and encrypt a file with AES-256-GCM. The encryption key is derived from the password with a single unsalted SHA-256, so the project is in beta and long random passwords should be used.
Features
- show: prints a .env file and masks secret-looking values (--unmask to reveal)
- diff: lists added, removed and changed keys between two .env files
- validate: checks empty values, key names, _URL, _EMAIL, _PORT and boolean values; exit code 1 on errors
- export: default, shell, docker and json formats
- merge and init: merge files, create .env from a template
- encrypt and decrypt: AES-256-GCM into .env.enc
Requirements
Rust 1.85+ to build from source (edition 2024); Linux, macOS or Windows release binaries
Install
curl -fsSL https://raw.githubusercontent.com/Ankara-Software/rustenv/master/install.sh | shcargo install --git https://github.com/Ankara-Software/rustenvUsage
rustenv show .env --unmaskrustenv diff .env .env.productionrustenv encrypt .env --password "long random password"Typing the password on the command line saves it in your shell history; use an environment variable instead.
Links
- GitHub repository
- https://github.com/Ankara-Software/rustenv
- Report an issue
- https://github.com/Ankara-Software/rustenv/issues
- Security policy
- SECURITY.md
- License file
- LICENSE (MIT)
- Last update

