100% Free & Open Source · Apple Silicon Native
Secret Manager app icon

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
Installs desktop GUI & sec CLI via Homebrew Cask
macOS 14 Sonoma & Sequoia Native Swift (CLI + App) No Plaintext .env 100% Free & Open Source
Secret Manager — Security Dashboard & Activity Log Secret Manager — Active
Log Live
Watching vault folders · Logging vault activity
Logged: 14 events Plaintext .env on disk: 0 files Decrypts without Touch ID: 0
Secret Manager Locked .env and wrote masked decoy to disk
✔ Touch ID just now
Runner Studio Running npm run dev with 12 secrets injected
✔ Touch ID 18s ago
Folder Watch Vault file removed in Finder, registry cleaned up
✔ Synced 42s ago
Ready to inject secrets into RAM
PID: —  |  Memory: 0.0 MB  |  Disk Plaintext: 0 bytes
[Secret Manager Studio] Ready. Select your command and click Run Server.
[Secret Manager Studio] Touch ID prompt will verify biometrics before in-memory injection.

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.

Step 01

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
Step 02

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
Step 03

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.

Terminal — zsh
# 1. Lock credentials into hardware vault & generate decoy
$ sec lock .env
# 2. Run your dev server with in-memory Touch ID RAM injection
$ sec npm run dev # or: sec cargo run, sec python app.py
# 3. Safely edit secrets in $EDITOR with automatic re-encryption
$ sec edit .env
Node.js Next.js Bun Vite Python / FastAPI Rust / Cargo Go Docker Compose Ruby on Rails
Command Reference

Explore all 16 CLI commands

Filter by category or search by command name, flag, or keyword.

Showing 16 of 16 commands
Markdown Specs
Core sec [-f <file>] <cmd...>

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)
$ sec npm run dev # Prompts Touch ID once; real keys go to the process, not your .env
Core sec lock [--force] [file]

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
$ sec lock .env # Encrypts to .env.vault & masks disk file
Core sec edit [file]

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.

$ sec edit .env # Opens nano/vim (or $EDITOR) and re-encrypts on save
Core sec view [file]  (alias: show)

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
$ sec view .env # View decrypted credentials without writing to disk
Core sec unlock [--yes] [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
$ sec unlock .env # Restores plaintext file and archives vault to trash
Discovery sec status

Displays environment diagnostics: Apple Silicon Secure Enclave master key configuration, Zero-Cache session state, current project vault path, and total indexed vaults.

$ sec status
Discovery sec list [--scan] [--prune] [--json]  (alias: ls)

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
$ sec list --scan ~/Developer
Discovery sec scan [directory]  (alias: find)

Fast shorthand to recursively crawl folders and register all existing .vault files into the centralized macOS status registry without manual navigation.

$ sec scan # Crawls ~ and registers all vaults
Backups sec backup [file] [--all] [--list]

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
$ sec backup --list # Shows version numbers, key counts, and dates
Backups sec restore [file] [-v <version|id>]

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
$ sec restore .env --version 1 # Reverts vault and decoy to v1
Backups sec trash [--restore <id>] [--purge <id>] [--empty]

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
$ sec trash # View soft-deleted vaults eligible for recovery
Security sec export-key  (alias: backup-key)

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.

$ sec export-key # Generates base64 recovery key string
Security sec import-key  (alias: restore-key)

Imports your master recovery key onto a new or wiped Mac, allowing all your existing .vault repositories to be unlocked with Touch ID immediately.

$ sec import-key # Prompts securely for recovery key
Security sec session [status|clear]

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.

$ sec session clear # Ends an active grace period immediately
Security sec logout

Immediately locks your biometric session state, requiring a physical Touch ID tap on the next CLI command or GUI action.

$ sec logout # 🔒 Session cleared. Touch ID required next.
System sec install-finder

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.

$ sec install-finder # Adds right-click services to Finder

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.

View on GitHub
$ brew tap rajanchavda/tap && brew install --cask secret-manager

Apple Silicon native  •  macOS Sonoma & Sequoia  •  100% Free & Open Source (MIT)