Encrypt .env files and switch profiles. One binary, zero setup.
Everyone leaks secrets eventually. .env files get committed. .env.example gets out of sync. Switching between dev/staging/prod means manually copying files. There's no standard, no tooling, and every team does it differently.
sealenv fixes this in one binary.
Homebrew
brew tap sozenka/sealenv
brew install sealenvCargo
cargo install sealenvDirect download
Grab the binary for your platform from Releases.
# Linux / macOS
curl -L https://github.com/sozenka/sealenv/releases/latest/download/sealenv-linux-x86_64.tar.gz | tar xz
sudo mv sealenv /usr/local/bin/# 1. Initialize sealenv in your project
sealenv init
# 2. Add your secrets
sealenv add DATABASE_URL=postgres://localhost/mydb
sealenv add API_KEY=sk-abc123
# 3. Encrypt .env — safe to commit
sealenv encrypt
git add .env.enc
git commit -m "chore: add encrypted env"
# 4. Run your app without ever writing .env to disk
sealenv run -- npm start| Command | Description |
|---|---|
sealenv init |
Initialize sealenv in a project, generate key, update .gitignore |
sealenv encrypt |
Encrypt .env → .env.enc (safe to commit) |
sealenv decrypt |
Decrypt .env.enc → .env |
sealenv add KEY=VALUE |
Add a secret to the active profile |
sealenv profile create <name> |
Create a new profile |
sealenv profile use <name> |
Switch active profile |
sealenv profile list |
List all profiles with active indicator |
sealenv run -- <cmd> |
Run a command with env vars injected, no file written |
sealenv diff <a> <b> |
Show differences between two profiles |
sealenv key export |
Export your key (share with teammates) |
sealenv key import <key> |
Import a key from a teammate |
- AES-256-GCM encryption — authenticated, tamper-proof
- Keys stored in
~/.sealenv/keys/— never in your repo sealenv initauto-adds.envand key paths to.gitignore- Profiles stored in
.sealenv/profiles/— all plaintext locally, encrypted separately sealenv runinjects vars directly into the subprocess environment — nothing touches disk
# Person A: set up and share key
sealenv init
sealenv encrypt
sealenv key export # → prints a base64 string
# Person B: import key and decrypt
sealenv key import <base64-string>
sealenv decryptsealenv profile create dev
sealenv profile create staging
sealenv profile create prod
sealenv profile use staging
sealenv diff dev staging # see what changed
sealenv run -- node deploy.jsIssues and PRs welcome. Please open an issue before working on large changes.
git clone https://github.com/sozenka/sealenv
cd sealenv
cargo build
cargo testIf sealenv saves you time or protects your secrets, consider sponsoring:
Company using sealenv in production? Reach out about priority support.