A .env file is every key your app uses, in plain text, in your project folder.
Anything that reads the folder reads the keys, and most of it never asks which files matter.
- Coding agents open it while they explore the repo. The contents land in the model’s context and the transcript, and go to the model provider along with everything else.
- Git commits it the first time an ignore rule is missing, and keeps it in history after you delete it.
- Sharing the project shares the keys: a zip for a contractor, a synced folder, a screen share with the file open.
Encrypt the file. Keep your workflow.
- 01
Import
envholster setupSetup finds projects with a
.env, lets you pick them, and shows the plan before it changes anything. It encrypts every value, reads them back to check, saves a recovery key where you tell it, and only then replaces.envwith a short note that points to the vault. - 02
Commit the vault
git add secrets.holster secrets.holster.recovery.age envholster.toml .gitattributes .gitignoreValues are encrypted to your machine’s key and the recovery key. Secret names are listed in
envholster.toml, so a diff still shows which secrets were added or removed. The recovery file is committed too; with your recovery key it restores every value. A git merge driver combines concurrent changes tosecrets.holsterrecord by record. - 03
Run as usual
envholster run -- npm run devValues are decrypted in memory and passed to your app as environment variables. No plaintext file is written. Setup can also wrap your existing dev script, so
npm run devkeeps working as typed.
Built for projects that already exist
- Next.js and Vite
.env.local,.env.productionand the rest import in each framework’s own order, into environments you pick at launch with--env production.- Tools that read .env themselves
envholster run --dotenvwrites a copy only you can read, for as long as the command runs, and removes it afterward. If the process is killed hard,envholster doctorfinds the leftover.- A second laptop, or CI
- Create a key on the other machine with
identity generate, add its public half withrecipient add, and commit. In CI, pass the key throughENVHOLSTER_IDENTITY. - Losing the laptop
- The recovery key lives off the machine, on a USB stick or on paper.
recovery verifyproves it opens the vault. The key and the committed recovery file restore every secret with the standardageandjqtools, without Env Holster.
What it doesn’t do
Env Holster takes plaintext keys out of your project folder. It is not a sandbox.
It won’t stop malicious code running as you.
Anything with your user’s access can read the machine key in
~/.config/envholsterand decrypt the vault, or simply runenvholster get.Your app gets the real values.
Whatever you start with
envholster run, dependencies included, can read, log or send them.It can’t un-leak a key.
If a key was ever committed, pasted or shared, rotate it with the provider. Old commits stay readable to every key that could open them.
Open to community review.
There has been no independent audit yet. The file formats are specified and the code is open. Please report problems privately, as described in the security policy.
Install
One binary for macOS and Linux, on Apple silicon, Intel and ARM64.
curl --proto '=https' --tlsv1.2 -fsSL https://github.com/envholster/envholster/releases/latest/download/install.sh | shThe script checks the release signature and checksum before it runs anything it downloaded, installs to ~/.local/bin, and starts setup. You don’t need Rust, Node, an account or sudo.
Or build from source with the pinned Rust toolchain:
git clone https://github.com/envholster/envholster && cd envholster && sh scripts/install.sh- Encryption
- XChaCha20-Poly1305 for values, age X25519 for keys
- Network
- No account, server, telemetry or auto-updater
- Code
- Rust, Apache-2.0
- Docs
- README, vault format, recovery
- Release key
- SHA-256
17205b925898b5a3d14a3c7f7aa34f366081d773b88aff6537f2a591081799c4