KeyBar app icon KeyBar for Mac

Your API keys,
out of sight

Keep your keys for Claude, Cloudflare, GitHub and the rest in your Mac's Keychain. Claude Code uses them by name to run commands, and never sees the values.

For Mac · macOS 14 or later · Works with Claude Code · Installs with Homebrew · Open source

KeyBar's menu bar panel listing keys such as ANTHROPIC_API_KEY and CLOUDFLARE_API_TOKEN, each with show and copy buttons

What it does

Paste it once,
never again

No more keys in .env files, shell history or chat transcripts. Store each one once, and Claude Code finds it when it needs it.

01

Store it once

Click the key in your menu bar and paste. KeyBar recognises keys from dozens of services and fills in the name for you, like ANTHROPIC_API_KEY or GITHUB_TOKEN. Got a .env file? Import it and pick which lines to bring in.

The Add a key form with a name and a hidden value

02

Claude uses it, never sees it

Click Connect Claude Code and KeyBar adds its MCP server to Claude Code for all your projects. Ask Claude to deploy your site or call an API, and it runs the command with your key set as an environment variable. Any copy of the key in the output, as written, base64, URL-encoded or reversed, comes back as [REDACTED].

list_secrets: the names of your keys and what they're for. Never the values.
run_with_secrets: runs a command with the keys it names, then hides them in what it prints.
The Claude Code screen in KeyBar's window, with Connect Claude Code and a note to add to CLAUDE.md

03

Touch ID first

Showing or copying a key asks for Touch ID, or your Mac's password. Before Claude Code uses a key, KeyBar asks too, and the prompt shows the exact command it wants to run. One yes covers the same keys in the same project for 15 minutes, or choose every time.

The panel with CLOUDFLARE_API_TOKEN's value shown after Touch ID

04

Every use, logged

See which key was used, by you or by Claude Code, the program it ran, the folder, the exit code and whether anything was hidden. Refusals are logged with the reason. Values never are.

The Activity screen listing runs by Claude Code with exit codes and hidden copies, a refused use, and keys shown and copied by you

05

Your rules

Lock a key to the project folders that need it, and commands anywhere else are refused. A command with a key's actual value pasted into it is refused too, so values stay out of the chat. Not using a key for now? Archive it, and Claude can't see it until you restore it.

Editing STRIPE_SECRET_KEY: name, group, note, a new value, and the project folder it's limited to

06

All in one place

The window gathers every key by service or by your own groups, in your own order, with search across names, services, groups and notes.

KeyBar's window in dark mode, listing keys grouped by Anthropic, GitHub, OpenAI and a Shop group

And the little things

Thoughtful touches

Small details that make it easy to live with every day.

Clipboard care

A copied key is wiped after 20 seconds, or 1 or 2 minutes, and clipboard managers are asked to skip it.

468 services

CLOUDFLARE_API_TOKEN shows as Cloudflare's API token, STRIPE_PUBLISHABLE_KEY as Stripe's publishable key. All built in, so nothing goes online to look it up.

A heads-up dot

A coral dot on the menu bar key tells you when Claude Code isn't connected. You can turn it off.

Starts when needed

If KeyBar isn't running when Claude Code needs a key, it starts quietly in the background.

Updates itself

Check for updates in Settings. KeyBar quits, updates through Homebrew and reopens.

Native, light and dark

Built in SwiftUI with no Electron. Light and dark mode, and a padlock that's always pleased to see you.

Private by design

Your keys
stay yours

In your Keychain

Each key is its own item in your Mac's login Keychain. Values are never written anywhere else, and KeyBar's list holds only names.

Only its own helper

KeyBar hands keys only to its own signed helper, the MCP server Claude Code runs, and only for one command at a time. Anything else that asks is turned away.

No tracking

No analytics, no account and nothing collected. The only time it goes online is to check for updates. It's open source, so you can check.

Download & install

KeyBar is free. It installs with Homebrew, a free and widely used tool for installing Mac apps and keeping them up to date. You only need to set it up once.

  1. Get Homebrew. Download the installer, open it and click through, like any Mac installer. It asks for your Mac password. Already have Homebrew? Skip to step 2.

    Download Homebrew
  2. Open Terminal, an app that comes with every Mac. Press ⌘ Space, type Terminal and press Return. A window with a blinking cursor opens.

  3. Click Copy, paste into Terminal with ⌘ V and press Return. Text scrolls past while Homebrew installs KeyBar. It's done when it stops.

    Install KeyBar
    $ brew tap RossNicholson/tap$ brew trust --cask rossnicholson/tap/keybar$ brew install --cask keybar

    See command not found: brew? Quit Terminal with ⌘ Q, open it again and paste once more.

  4. Open KeyBar from your Applications folder. If your Mac asks whether you're sure you want to open it, click Open. Add your first key, then go to Claude Code and click Connect Claude Code. New Claude Code sessions can use your keys straight away.

What your Mac will ask

Your Mac checks with you before an app can do certain things. Here's what KeyBar asks for, and what to do.

  • Touch ID. When you show or copy a key, and when Claude Code wants to use one. Touch the sensor, or type your Mac password. The prompt says which key and, for Claude, which command.
  • Launch at login. If you turn it on in Settings, macOS shows a notice that a login item was added. That's expected.

On an older Homebrew, an error about brew trust is safe to ignore.

Keep your keys
to yourself

KeyBar is free, open source, and signed and notarized by Apple.

Enjoying it? Buy me a coffee ☕ · Need help? Support

Also from me: ClawdBar, your Claude Code limits in the menu bar, and BrewDock, Homebrew in your menu bar

KeyBar is an independent app and isn't affiliated with or endorsed by Anthropic. Claude and Claude Code are trademarks of Anthropic.