AI coding agents are reading your .env.
Stop them with Touch ID.
Shield live API keys and database credentials from Cursor, Claude, Copilot, and background tools. Real secrets stay encrypted with a key held in your Mac's Secure Enclave and are handed to your app on a Touch ID tap. Your .env only ever holds decoys.
$ brew tap rajanchavda/tap && brew install --cask secret-manager
sec CLI via Homebrew Cask
.env and wrote masked decoy to disk
npm run dev with 12 secrets injected
How It Works
Three steps. No plaintext .env.
Keep linters, TypeScript, and static tools happy with decoy placeholders, while injecting real keys directly into process RAM on Touch ID tap.
Lock with Touch ID
Run sec lock .env or right-click in Finder. Encrypts real secrets into .env.vault with AES-256-GCM. Replaces disk .env with sanitized dummy placeholders (API_KEY=locked_by_sec).
$ sec lock .env
Tap Sensor
Prefix your command with sec (e.g. sec npm run dev). Touch ID prompts once for your physical fingerprint. Secrets are decrypted only after your tap and passed to the process you started, while your .env keeps its decoys.
👆 Physical Touch ID Tap
In-Memory Execution
Secrets are injected into the child process environment (process.env) and are gone when it exits. No plaintext .env is written; Node.js and Python use a short-lived owner-only loader file that deletes itself on load.
RAM Only · Zero-Cache
Features
Built for Apple Silicon. Engineered for Privacy.
Everything you need to secure your developer credentials without changing how you code.
Live Vault Activity Log
A live, timestamped record of everything Secret Manager does with your vaults: locks, Touch ID unlocks, edits, dev-server runs, snapshots and restores. Vault folders are watched so files moved or deleted outside the app are picked up immediately.
- Every decrypt, edit and run logged with a timestamp
- Detects vault files changed or removed outside the app
Apple Secure Enclave
Master encryption keys are generated and stored inside Apple Silicon hardware (CryptoKit P-256 + HKDF), eliminating annoying keychain password prompts.
Preload Loaders
Node.js and Python receive secrets through a self-deleting, owner-only preload hook. Once loaded they are regular environment variables of your app and its child processes.
Runner Studio & Menubar
Visual dev runner with real-time console log streaming, combined with a macOS menu bar sentinel reflecting live lock status.
Finder Right-Click Actions
Right-click any .env file in Finder to lock or edit with Touch ID. Native notification banners confirm protection status.
100% Offline & Free Forever
Zero telemetry, zero external network requests, zero remote servers. Permissive MIT license with no paywalls, accounts, or subscriptions.
Developer Experience
Simple, ergonomic CLI commands
Prefix any command with sec. Touch ID handles the rest.
Explore all 16 CLI commands
Filter by category or search by command name, flag, or keyword.
Executes dev servers or scripts with decrypted secrets injected into the process environment. No plaintext .env is written to disk, so tools and AI agents reading your project files only find the decoy.
-f, --file, --vault <path>
Inject a custom secret/vault file
--shell '<cmd line>'
Run a shell command line (pipes, &&, $VAR)
Hardware-encrypts target file into an AES-256-GCM .vault. Replaces the file on disk with safe masked dummy values (locked_by_sec) so linters and parsers continue to work without exposing keys.
--force, -f
Force re-lock if already protected
Decrypts vault secrets into an ephemeral buffer with strict 0600 permissions, opens your $EDITOR (nano or vim in the terminal by default), re-encrypts on save and deletes the buffer. Unsaved edits are kept as an encrypted rescue copy, never plaintext.
Prompts Touch ID and prints decrypted secrets to your terminal. If the file is JSON, it formats and indents the output automatically. Refuses when output is piped or captured (for example by an AI agent's shell tool) unless you pass --force-stdout.
--force-stdout
Allow printing to a pipe or file
Permanently decrypts the vault, restores plaintext secrets back to disk, and moves the encrypted vault to soft-deleted trash to prevent accidental data loss.
--yes, -y, --force, -f
Skip confirmation warning
Displays environment diagnostics: Apple Silicon Secure Enclave master key configuration, Zero-Cache session state, current project vault path, and total indexed vaults.
Audits and catalogs all locked vaults across your Mac grouped by directory. Displays target files, encrypted vault sizes, decoy statuses, and last modified dates.
--scan, -s [dir]
Search & register unindexed vaults
--prune, -p
Clean removed or missing vaults
--json
Output structured JSON for CI/CD
Fast shorthand to recursively crawl folders and register all existing .vault files into the centralized macOS status registry without manual navigation.
Creates immutable, versioned backup snapshots in ~/.sec/backups/. Lets you edit credentials fearlessly, knowing you can roll back to any prior version.
--all
Snapshot all registered vaults
--list
View version history and timestamps
Rolls back the current project's vault to a previous version snapshot. Synchronizes both the encrypted vault file and the on-disk masked decoy placeholder. Version numbers only match this project's snapshots; a snapshot ID from sec backup --list can name any vault.
-v, --version <id|#>
Target version number or UUID prefix
Manages soft-deleted vaults. When vaults are unlocked or removed from disk, they are automatically placed into the trash bin to prevent accidental credential loss.
--restore, -r <id>
Recover archived vault back to original path
--purge, -p <id>
Permanently delete single trashed vault
--empty, --purge-all
Purge all trashed vaults
Exports your base64 master hardware recovery key. Store it securely in your password manager (e.g. 1Password) for disaster recovery or when migrating to a new Mac.
Imports your master recovery key onto a new or wiped Mac, allowing all your existing .vault repositories to be unlocked with Touch ID immediately.
Inspects or clears the biometric grace-period session. In strict Zero-Cache mode (default) nothing is cached, so every command requires a fresh physical Touch ID tap and clear has nothing to flush.
Immediately locks your biometric session state, requiring a physical Touch ID tap on the next CLI command or GUI action.
Installs macOS Finder Quick Actions into ~/Library/Services/. Allows you to right-click any .env or .vault in Finder to Lock, Unlock, Edit, or View secrets with native macOS notification banners.
No commands matched your filter criteria.
FAQ
Frequently Asked Questions
Quick answers to common questions about Apple Silicon biometrics and threat protection.
Is Secret Manager really 100% free? Are there any hidden costs?
Yes! Secret Manager is 100% free and open-source under the MIT license. There are no subscriptions, no paid upgrades, no feature locks, and no cloud backends. Everything—the native Swift CLI binary, the Finder Quick Actions, and the complete Secret Manager macOS desktop application—is completely free forever.
Can Secret Manager see when an AI agent reads my .env?
No. macOS only tells ordinary apps when files are written, renamed or deleted, not when they are read, so Secret Manager cannot see or name the tool that opens a file. It does not need to: the .env on disk holds only decoy placeholders (locked_by_sec), so whatever reads it gets no secrets. The Activity Log records what Secret Manager itself does (locks, Touch ID unlocks, edits, runs) and changes to your vault files. Each Touch ID prompt also names the processes that launched the request, so you can refuse one you did not start.
What happens to my IDE and linters when `.env` is locked?
When sec lock runs, it inspects your .env keys and replaces their values with locked_by_sec. This keeps the file syntactically valid. ESLint, Prisma schema validators, TypeScript types, and dotenv parsers continue to function without crashing.
Does it work when my MacBook lid is closed (clamshell mode)?
Yes. Apple's LocalAuthentication framework automatically falls back to an Apple Watch biometric tap, Touch ID on an external Apple Magic Keyboard, or your Mac login password if the MacBook display lid is closed.
How do I uninstall the CLI and desktop app?
If installed via Homebrew Cask, simply run brew uninstall --cask secret-manager to remove both the app and the sec CLI symlink.
If installed from source, run ./uninstall.sh (or make uninstall) from the repository. This cleanly deletes the CLI binary, removes Finder Quick Actions from ~/Library/Services/, and flushes macOS system services.
Ready in 30 seconds
Start protecting your secrets today
100% Free & Open Source on GitHub. Native Swift binary directly on your Mac with zero external dependencies.
$ brew tap rajanchavda/tap && brew install --cask secret-manager
Apple Silicon native • macOS Sonoma & Sequoia • 100% Free & Open Source (MIT)