keyreeve

A key vault for your Mac that agents can use without seeing the keys

keyreeve seals your API keys on your own Mac, checks with each provider that they still work, and lets an agent run a command with a key it never holds. It is free and open source.

A short tour of the keyreeve window: Home with the keys in use and who used them, My keys, a key offered to agents, and the Agents part of Tools. Every key in it is a made-up example.
Home, My keys, a key's Usage tab and Agents. Every name and value in these pictures is made up.

Early. Sealing, checking and agent access are used every day on one Mac. Rotation passes the simulator and has not run against a real provider yet. There are no prebuilt downloads.

How an agent uses a key without seeing it

The agent asks to run a command with a key. The command gets a stand-in of the same shape, and a local proxy puts the real key only on requests to that provider's hosts.

How use_key works The agent calls use_key. The command runs with a stand-in in its variable. Its request goes through a local proxy, which takes the real key from the vault and puts it on the request only when it goes to the provider's own host. Requests to any other host keep the stand-in. Replies come back with the key replaced by the stand-in, so the agent only ever sees output. Agent use_key netlify -- curl … Command NETLIFY_AUTH_TOKEN = stand-in request Local proxy on your machine Vault Secure Enclave real key, as the key's level allows api.netlify.com gets the real key any other host gets the useless stand-in Replies come back with the key swapped for the stand-in. The agent sees the output, never the key.
The swap happens in headers and Basic passwords, and in the address only for a provider that takes its key there, such as Telegram. A body keeps the stand-in, so a tool that sends its key in a body fails and leaks nothing.

What agents can see

You choose which keys agents may know about. The rest do not exist for them.

Offered to agents or not Every key in the vault is either offered to agents or not. A key that is not offered is invisible to agents: list_keys leaves it out, and its name answers as if it were not there. A key that is offered shows its name to agents, who can ask for it; its level decides the rest. Keys given identifiers in bulk start not offered. A key you add yourself, or check on its page, is offered. A key in the vault identifier given in bulk added or checked by you Not offered Agents do not see it. Its name answers as one that is not there. Offered Agents see its name and can ask for it. Its level says the rest. Unchecking a key closes it: its level, agents and allowed programs go with it.
A key's page on the Usage tab, with the box Offered to agents checked and the level Free for opencode.
A key's page, Usage tab: offered to agents, at the level Free for opencode.

Who decides

Each offered key has a level, and only you set it, in the app. Your fingerprint is the answer.

The four levels of a key Only me: agents see the name and can only ask for it. Ask: a window shows the key, the command and the agent's reason; you choose once or for 1 to 24 hours, or deny, and confirm with your fingerprint. Free: one fingerprint, then no questions until you quit Keyreeve, a day at most. Always, no fingerprint: one fingerprint to seal a second copy, then agents use it through the proxy with no question, across restarts. The real key always asks for a fingerprint. Only me The default. Agents see the name and can only ask. Ask You see the command and why, then pick once or 1 to 24 h. Free One fingerprint, then none until you quit, 24 h at most. Always, no fingerprint Through the proxy only, across restarts. For read-only keys. The real key itself (get, --real) asks every time.
Quitting Keyreeve, or Lock everything in the menu bar, ends every permission at once. Every yes, no and refusal goes in a log with the agent's reason.
The Agents section: whether Claude Code is connected, and each offered key with its level and the agents it is open to.
Tools, Agents: what each agent may use, and how.

Agents connect over MCP with keyreeve-vault mcp. They get list_keys, use_key, request_access, run_with_key and rotate_key, and, for you to approve, tools to find keys, bring them in, tidy their names and say where each one lives. None of them returns a value. A skill teaches an agent to use them well.

Security and backup: the vault, the sealed keys and the backup.
Tools, Security and backup. Each sealed key is a standard age file, so you can open it without keyreeve.

Coding agents and MCP servers

A coding agent such as opencode or Claude Code can run under use as a whole, so its config, its database and its logs only ever hold stand-ins:

keyreeve-vault use openai,github --as openai=OPENAI_API_KEY,github=GITHUB_TOKEN --for 8h -- opencode

Its config points at the variables, the headers of a remote MCP server included. A remote MCP server that signs in with OAuth is signed in once by keyreeve, which keeps the refresh token and renews the access token itself. How.

Install

You need macOS 14 or later, the Command Line Tools and Rust. The build is not notarized, so macOS warns you the first time.

git clone https://github.com/carlostapiacl/keyreeve
cd keyreeve
app/build-app.sh
ditto app/dist/Keyreeve.app /Applications/Keyreeve.app
open /Applications/Keyreeve.app

After the first copy, each run of build-app.sh updates the one in /Applications, and reopens Keyreeve if it was open.

Recipes

Everything keyreeve knows about a provider lives in one YAML file, and the app knows no provider by name. A recipe is data and cannot run code. It talks HTTPS only to the hosts it lists. keyreeve ships 33 recipes, and the most useful contribution is one for a provider you use.

Security

keyreeve guards keys. It is not a sandbox, and a program running as you can do what you can. The vault's code has had no outside review. The threat model lists what it protects against and what it does not. To report a vulnerability, use private reporting.

Read more