# envsave

> A local AES-256 encrypted secrets vault that gives AI agents opaque keys instead of real API keys, tokens, and passwords.

envsave is a local encrypted vault for API keys, tokens, and passwords, built by AI Agents Lab so that LLM coding agents never see real secret values. Instead of reading plaintext keys or a .env file, agents use opaque identifiers (es_...) that resolve to the real value only through the vault on the user's machine. It ships as a CLI and library for Node.js/Bun and Python, with a Claude Code skill, and is released under the MIT license.

## What It Is

envsave is a command-line secrets manager aimed at developers who run AI assistants or coding agents on their codebases. Secrets are stored in a single AES-256-GCM encrypted vault file at ~/.envsave/vault.enc, with PBKDF2 key derivation and an optional SSH key as a second factor. Key names are stored as HMAC-SHA256 hashes, so the opaque keys carry no trace of the original names and, per the project, cannot be reversed or enumerated without the master password.

## How the Workflow Works

A user installs the CLI via npm or pip, runs `envsave init` to create the vault, and stores a secret with `envsave set NAME value`. The command returns an opaque key such as es_7a3f..., which code then passes to `get()` in Node.js/Bun or Python to retrieve the real value at runtime. Further commands cover revealing, searching, listing, renaming, deleting, importing from and exporting to .env files, and scanning a project for hardcoded environment references. Re-running `set` on an existing name updates the value while keeping the same opaque key, so code does not need to change.

## Safeguards Against Agent Access

- `envsave get` is rate-limited, with a configurable maximum per minute, to blunt scraping from a compromised session.
- On macOS, Touch ID can approve vault commands; AI agents cannot approve the prompt, so password-gated commands still need the user.
- A session cache keeps decrypted secrets in memory so repeated reads do not require the password each time.

## Deployment, Backup and Agent Skill

`envsave vercel` pushes selected secrets to a Vercel project under both the opaque id and the clean name, so deployed code works without a local vault. Cloud backup, restore, and sync of the encrypted vault across machines require a license; the server stores only encrypted bytes. An envsave skill can be installed for Claude Code via `npx skills add` or `envsave install-skill`, so the agent uses opaque keys when it touches secrets.

## Features
- AES-256-GCM encrypted local vault
- Opaque HMAC-based es_ keys that cannot be reversed or enumerated
- Node.js/Bun and Python libraries
- Project scan for hardcoded env references
- Import from and export to .env files
- Rate-limited get command
- Touch ID unlock on macOS
- Optional SSH key second factor
- Push secrets to Vercel
- Encrypted cloud backup and sync
- Claude Code skill installation

## Integrations
Claude Code, Vercel, npm, PyPI, Node.js, Bun, Python

## Platforms
WINDOWS, MACOS, LINUX, API, DEVELOPER_SDK, CLI

## Pricing
Open Source

## Version
1.0.4

## Links
- Website: https://www.envsave.com
- Documentation: https://www.envsave.com/docs
- Repository: https://github.com/jcsancho/envsave
- EveryDev.ai: https://www.everydev.ai/tools/envsave
