A fast, secure environment variable and secret management tool — written in Rust.
rustenv helps developers manage .env files, compare differences between environments, validate configurations, mask secrets, and securely encrypt/decrypt environment files.
- Profile Management — Handle
.env.development,.env.staging,.env.productioneasily. - Diffing — Compare variables between two environments with colorized output.
- Validation — Scan environment files for missing values, invalid ports, malformed emails, and invalid URLs.
- Smart Masking — Automatically hide sensitive keys (like passwords, keys, secrets, tokens).
- Strong Encryption — Encrypt and decrypt
.envfiles with AES-256-GCM. - Multi-Format Export — Export variables to Shell (
export KEY=val), Docker Compose, or JSON. - Interactive Init — Initialize
.envfrom a template, prompting you for each value.
cargo install --git https://github.com/anilcan-kara/rustenv.gitYou can download the precompiled static binary for your platform directly from the GitHub Release assets:
- 💻 Windows (x64): rustenv-win32-x64.exe
- 🐧 Linux (x64): rustenv-linux-x64
- 🐧 Linux (ARM64): rustenv-linux-arm64
- 🍎 macOS (x64): rustenv-darwin-x64
- 🍎 macOS (ARM64): rustenv-darwin-arm64
rustenv show # Shows variables (masked by default)
rustenv show --unmask # Shows variables unmaskedrustenv diff .env.staging .env.productionChecks for empty values, syntax rules, and common formats (_PORT, _URL, _EMAIL).
rustenv validaterustenv export --format shell
rustenv export --format docker
rustenv export --format jsonSecurely encrypt your .env file before committing to source control.
rustenv encrypt .env
rustenv decrypt .env.encrustenv merge .env.base .env.local -o .envrustenv init --from .env.template --output .env --interactiveThis project is licensed under the MIT License.