Vaultenv stores all your secrets AES-256-GCM encrypted on your local machine and injects them directly into your app at runtime — without ever exposing them to your shell, your logs, or any AI agent.
When you develop with AI agents like Claude Code, your real keys flow through a dozen surfaces you don't control. Even when you're careful, secrets leak.
.env# .env on disk OPENAI_API_KEY=sk-proj-abc123... # agent: read_file('.env') → sees your real API key
// debug.log console.log(process.env.OPENAI_API_KEY) → sk-proj-abc123…
$ git log --diff-filter=A -- .env # the secret you committed # three months ago → sk-proj-abc123…
// ~/.secure-vault/vault.encrypted {"iv":"…","authTag":"…", "data":"6f3a9c1e…"} → unreadable without master password
Your code keeps reading process.env.X exactly as before. Vaultenv handles registration, decryption and injection.
The shell never sees them. The agent context never sees them. They appear, do the work, and vanish when the process exits.
Vaultenv is built on Node's built-in crypto module — the same primitives audited and shipped in TLS, signal, and 1Password.
| Algorithm | AES-256-GCM |
| Key size | 256 bits |
| Key derivation | PBKDF2-SHA256 |
| Iterations | 100,000 |
| Salt | 32 bytes random, unique per install |
| IV / Nonce | 16 bytes random, unique per write |
| Auth tag | 16 bytes (tamper detection) |
| Session key storage | OS Keyring |
| Cleared on shutdown | Yes, automatically |
┌──────────┐
│ ╭────╮ │
│ │ │ │
╭┴──┴────┴──┴╮
│ │
│ ● │
│ │ │
│ │
╰────────────╯If your machine is stolen powered-off, the keyring is empty. The vault file alone is unreadable. There is no password recovery — only re-init.
HashiCorp Vault, Doppler and direnv all solve adjacent problems. Vaultenv fills a specific one: agent-resistant secret management on a single dev machine, with no server.
| Vaultenv | HashiCorp Vault | Doppler | direnv | |
|---|---|---|---|---|
| Local only | ✓ | — server | — cloud | ✓ |
| Encrypted at rest | ✓ | ✓ | ✓ | ✗ |
| Free | ✓ | partial | partial | ✓ |
| Zero server setup | ✓ | ✗ | ✗ | ✓ |
| AI agent protection | ✓ | ✓ | ✓ | ✗ |
| Works offline | ✓ | ✗ | ✗ | ✓ |
| Setup time | ~1 min | hours | ~10 min | ~5 min |
Clone the repo, install dependencies, link globally so vault works from any directory.
Set a master password once. Vaultenv creates ~/.secure-vault/vault.encrypted and unlocks the session.
Set each secret with a name and value. Then start your app via vault run --. Done.
MIT-licensed. No telemetry. No accounts. Your machine, your keys, your rules.