Take your API keys out of plaintext .env files.

Env Holster moves them into an encrypted vault you can commit to git. Your app still gets its environment variables. Anything that just reads your project folder, like an editor, a coding agent or a careless git add ., finds ciphertext instead.

Free and open source · macOS and Linux · No account, server or telemetry

~/my-app
cat .envOPENAI_API_KEY=sk-proj-4f9a…STRIPE_SECRET_KEY=sk_live_51H…DATABASE_URL=postgres://app:x7Q…@db/appenvholster import .env --encrypt-allimport complete: 3 secret(s) added, 0 updated, 0 var(s) written to the manifest, 0 skippedDelete the imported plaintext file .env now? [y/N]: ydeleted .envcat .env# Managed by Env Holster.# Secrets are encrypted in secrets.holster; non-secret config is in envholster.toml.# Run your app with:   envholster run -- <your command># See what is set with: envholster listgit add secrets.holster secrets.holster.recovery.age envholster.toml .gitattributes .gitignoreenvholster run -- npm run dev

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.

  1. 01

    Import

    envholster setup

    Setup 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 .env with a short note that points to the vault.

  2. 02

    Commit the vault

    git add secrets.holster secrets.holster.recovery.age envholster.toml .gitattributes .gitignore

    Values 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 to secrets.holster record by record.

  3. 03

    Run as usual

    envholster run -- npm run dev

    Values 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 dev keeps working as typed.

Built for projects that already exist

Next.js and Vite
.env.local, .env.production and 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 --dotenv writes a copy only you can read, for as long as the command runs, and removes it afterward. If the process is killed hard, envholster doctor finds the leftover.
A second laptop, or CI
Create a key on the other machine with identity generate, add its public half with recipient add, and commit. In CI, pass the key through ENVHOLSTER_IDENTITY.
Losing the laptop
The recovery key lives off the machine, on a USB stick or on paper. recovery verify proves it opens the vault. The key and the committed recovery file restore every secret with the standard age and jq tools, 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/envholster and decrypt the vault, or simply run envholster 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 | sh

The 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
Release key
SHA-256 17205b925898b5a3d14a3c7f7aa34f366081d773b88aff6537f2a591081799c4