SecretBar — Agent-safe secrets for Mac - Your agent knows the name. Never the value.

by•
SecretBar is a free, open-source Mac app and command line tool that keeps secrets safe from AI agents. Passwords, tokens and API keys live in the Secure Enclave. The agent asks for a secret by name, you type it in a hidden macOS dialog, and the value goes only into the process that needs it. Output comes back masked as ***. Touch ID to read, post-quantum encryption, a Claude Code hook, time-boxed leases for unattended agents, Spotlight and Siri search. No cloud, no dependencies.

Add a comment

Replies

Best
Maker
📌

Hi Product Hunt! 👋

I'm Andrew, maker of SecretBar (and of Gantry, which some of you met in June).

I work with AI agents in the terminal all day: Claude Code, Codex. Sooner or later every agent needs a database password or an API token. The usual paths are bad: paste the value into the chat, or let the agent cat .env. Either way the secret ends up in a transcript, a log or a model provider's servers. So I built the tool I wanted: the agent works with names of secrets, and never with the values.

How it works:

  • 🔐 Secure Enclave store: every value is sealed by keys in your Mac's Secure Enclave, P-256 plus post-quantum ML-KEM-768. Reading needs Touch ID or Apple Watch.
  • ⌨️ Hidden input: secret ask NAME opens a macOS dialog, so you type the value there, not in the chat.
  • 🎭 Masked output: secret run --mask NAME -- cmd puts the value only into the environment of cmd and replaces it with *** in the output, also in base64 and URL encoding.
  • 🛑 Claude Code hook: stops secret get, cat .env and env before they run.
  • ⏳ Leases: give an agent named secrets for up to 24 hours with one Touch ID, so it can keep working while your screen is locked.
  • 🍪 Browser sessions: move a Safari session into the store, and the agent uses it with curl without seeing a cookie.
  • 🖥️ SecretBar menu bar app: ⌥⌘S search, Spotlight and Siri, expiry reminders, an access log. In 8 languages.

It's free and open source (MIT), one brew install secretbar/tap/secretbar, no cloud and no dependencies beyond macOS.

I'd love your feedback, especially from people who run agents on real projects. How do you handle secrets with agents today? What would make you trust a tool like this?