What you wrote, and what leaves.
Secrets are always masked. Names, emails, phone numbers and addresses are masked too when you turn personal data on.
The staging deploy fails. Log in as dana.whitfield@example.com with password Zq8vX2mN4pL7kR9t and check why the key sk_live_51Hx8fQ2eZvKYlo2C7a9Rb is rejected.
The staging deploy fails. Log in as KEEPMUM_EMAIL_a41c07e2 with password KEEPMUM_SECRET_3b91d0aa and check why the key KEEPMUM_SECRET_7f3a9c2e is rejected.
Placeholders in the answer become real values again, so your agent can still log in, edit your .env and run your tests. Tools that reach the network get less: web search, fetch and image generation keep the placeholders, an MCP server gets back only what it returned itself, and none of them ever gets a secret. When a Codex script reads your .env itself, a key in a provider’s format is withheld before a network tool gets it.
Four steps, all on your Mac.
Detect
96 rules with entropy and checksum checks, then OpenAI Privacy Filter on your Mac’s GPU for what only context gives away. A hex dump or base64 of your .env is decoded and scanned too, even folded across lines. A last step drops UUIDs, hashes and documented example keys.
Mask
Each value becomes a placeholder made with a key only your Mac has. The same value always gets the same placeholder, so the provider’s prompt cache keeps working.
Restore
Real values go back into streamed text, file edits and shell commands. They live only in memory, and are cleared when keepmum quits.
Fail closed
A request keepmum can’t scan (an unknown endpoint, an unreadable body, a WebSocket) is blocked. It is never sent raw.
Three checks, if you want them.
All off until you turn them on, and all on your Mac. Warn sends the request and logs a hit. Block refuses it. Local, for the first two, sends a flagged request to a model on your Mac instead of the provider, so your agent still gets an answer, with your own skills if you add them. It works with every agent here, the Antigravity CLI and Gemini CLI included. After a check keeps a turn local, keepmum can also hand the conversation back: the local model summarises or rewrites a flagged tool result, or takes the flagged part out of what you typed, and the cloud model carries on without ever seeing it. Each check gets its own instruction and skills for that.
Prompt injection
Checks what tools bring back (web pages, files, shell output, MCP replies) for instructions planted for your agent. At the default level it catches 97% of injected documents on keepmum’s test set and 85% of AgentDojo’s attacks, and flags 1.7% of tool results in real Claude Code and Codex sessions.
Harmful requests
Checks what you type, not what tools return. The default model catches 66% of harmful prompts and flags 5% of safe ones, in 8 ms; larger ones catch up to 82%.
Risky commands
Checks the shell commands a reply asks your agent to run: a download piped into a shell, deleting your home folder, erasing a disk, credentials sent over the network. Seven rules, no download.

You look before it goes.
Turn on review, and nothing a check flagged goes to the cloud until you say so. A panel shows what the local model wrote beside the original: send it, edit it, ask the local model to change it, or keep the turn on your Mac. Or review the whole turn in one window, every flagged piece side by side, each rewritten, sent as it was (after a warning) or removed. The clock pauses while the local model writes, and never runs past what your agent waits. A demo in the app shows how it works before one comes up.

Every check, where it acts.
The Protection map draws a request’s round trip once, with each setting on the part it acts on: the checks before a request leaves, masking at the edge of your Mac, the commands check and restore on the way back. Where a hit goes follows its mode, to the log, to a refusal, or to your local model and back to the cloud. Change a mode on its card. Send a sample, twelve made-up requests from a planted instruction to a role-play prompt the harm check mistakes for harm, takes the route your settings give it and says what happened. Nothing leaves your Mac.

Notices what other apps add to your agents.
Any app you run can write to your agents’ settings. In October 2026, an update to a popular API client enabled its own plugins in Claude Code and Codex, added a hook that told every Codex session to use its skill, and marked that hook as trusted, without asking. keepmum can’t stop an app from writing those files, so it watches them.
Spots what’s new
Plugins, plugin marketplaces, hooks, MCP servers, skills and the instruction file every session reads, in Claude Code, Codex, Cursor, the Antigravity CLI, Gemini CLI, Copilot CLI and opencode. What you already have is yours; anything that appears later shows up in the menu bar.
Flags standing instructions
A hook that runs at every session start or prompt can put its own instructions in front of your agent. keepmum marks those, including a Codex hook trusted on your behalf.
Takes it back out
Keep what you added; remove what you didn’t. keepmum edits only that one entry, after a backup, and logs it. It never changes an agent’s settings on its own.
A menu bar app that shows its work.
Set up in three steps: download the model, start the background service, switch on protection for each agent. Then watch requests go out and replies come back, see what was masked and what a check flagged, choose what gets masked, and check the audit log. The menu bar starts and stops the service, and says when something needs you.

Every session
With protection on, Claude Code goes through keepmum in the terminal, VS Code and the desktop app.
Your rules
Turn off a type, add your own patterns, list exceptions, or leave a project out entirely.
An audit log
Every change that turned protection down, who made it and when, in a log that shows if it was edited.
Measured, not promised.
On synthetic, labeled datasets on an M5 Pro. The method and every result are in the repo.
What keepmum doesn’t do.
It’s a safety layer, not a guarantee. Here is where it stops.
Every limitation, in fullShell commands get real values
A GitHub, Stripe or AWS token stays a placeholder in a command that would send it to another host. A password, or a command built to hide where it sends things, gets past that: pair keepmum with a sandbox that limits the network.
Your local history keeps them too
keepmum protects what leaves your Mac, not what your agent stores on it.
Unusual IDs get masked by mistake
On the hardest fresh tests, 3 to 9 of 15 harmless IDs were flagged. That costs the model some context, never a leak.
Images and PDFs pass unscanned
Only text is checked. The local model is strongest on English.
Two ways in.
The Mac app
Everything included: keepmum, its Python runtime and the model server. Drag it to Applications, open it, and follow Setup.
Download for MacVersion 0.1.0a15 · built
macOS 14 or later on Apple silicon. The model needs 1.6 GB of disk; while it runs, about 0.2 GB of memory, with its file in macOS's cache.
The command line
With Python 3.12, uv and the Xcode command line tools.
git clone https://github.com/blueandhack/keepmum.git
cd keepmum && uv tool install --editable .
native/pf-serve/build.sh
keepmum setup
keepmum claude
Questions, answered.
The short version. The docs have the long one.
How do I stop Claude Code from sending my API keys to Anthropic?
Run it through keepmum. In the Mac app, switch on protection for Claude Code; on the command line, start it with keepmum claude. Each request is then scanned on your Mac, and every key, token or password is replaced with a placeholder before it is sent. The real value goes back into the answer, so Claude Code can still use it.
Which coding agents and providers does it work with?
Claude Code (in the terminal, VS Code and the desktop app), Codex, the Antigravity CLI, Gemini CLI, pi and opencode, talking to Anthropic, OpenAI or Google. It can also sit in front of a gateway you already use, such as LiteLLM, OpenRouter or a company proxy, which then gets placeholders only.
What does keepmum mask?
Always secrets: API keys, tokens, passwords, private keys and connection strings, in code, config files, command-line flags and plain sentences, and in a hex dump or base64 of them. With personal data on, also names, emails, phone numbers, addresses, account numbers and dates of birth. You can turn off a type, add your own patterns and list exceptions.
Can my agent still work if the model never sees the real values?
Yes. Placeholders in the answer become real values again on your Mac, in streamed text, file edits and shell commands, so your agent can still edit your .env, log in and run your tests. The same value always gets the same placeholder, so the provider’s prompt cache keeps working.
Does anything leave my Mac?
Only the scanned request, on its way to the provider. Detection runs on your Mac, masked values live only in memory, and there is no telemetry. keepmum downloads its models when you set it up, and the Mac app checks for updates only if you say yes.
How much time does it add?
About 100 to 145 ms at the 95th percentile for 4K tokens of new text; earlier turns are cached. With the model off and the rules alone, 8 to 9 ms. It stays that way however long keepmum runs: its memory levels off at about 130 to 150 MB, and its CPU at under 5 ms a request.
Is keepmum enough on its own?
No. It controls what the provider sees, not what commands do: shell commands get real values, so git push and curl keep working. Pair it with a sandbox that limits the network, such as Claude Code’s. keepmum is also alpha, and not yet independently audited.
Is it free, and what does it need?
Free and open source, under Apache 2.0. It needs a Mac with Apple silicon and macOS 14 or later. The local model takes 1.6 GB of disk, and while it runs about 0.2 GB of memory, with its file in macOS's cache; with the rules alone, neither.