shim-cli
Local traffic visibility and privacy controls for coding agents.
getshim.tech
shim-cli shows you what your coding agent actually sends to the model — how
many tokens went where, what the turn cost, and which secrets and personal data
were in it — and masks what it can before the model sees it. The hook and
detector add no network destination, account, API key, or telemetry. The opt-in
shim watch proxy forwards only to the provider the client already uses.
Quickstart
uv tool install --python 3.12 --compile-bytecode shim
shim demo claude # a synthetic sentence, masked, and what Claude Code does with it
shim install claude # then start a new Claude Code session
The package and the command are both shim. In the new session, ask Claude to
read a .env holding AWS_ACCESS_KEY_ID=[REDACTED:AWS Access Key]: the model gets
<SECRET_1>, and the turn ends with shim's summary. Codex and GitHub Copilot
CLI use shim install codex or copilot; Install has pipx, the plugin and VS Code.
What it cannot do
- A prompt you type into Claude Code or Codex is not masked: neither client
lets a hook rewrite it. shim reports it, or stops it under
enforce. GitHub
Copilot CLI is the exception: the model gets the masked prompt.
- Codex and GitHub Copilot CLI tool traffic is not inspected at all.
- VS Code masks nothing: it reports, and under
enforce stops a prompt or
a tool call before it runs. A tool result can only be reported.
- In Claude Code, shell commands and file writes are reported or denied, not
masked; the output of a failed command is reported, not masked; a file
attached with
@ is read and reported, not masked. A path or pattern given
to a local tool such as Read or Grep is only reported, and an MCP tool's
arguments are never masked: a call carrying a finding is refused by
default, and the refusal names the [mode] key that lets that tool
through.
- Windows is not supported. macOS and Linux are; WSL is not yet verified.
Detection is best-effort and misses some values. Privacy lists every limit.
Two commands, two different questions:
| Command | Answers |
|---|
shim watch -- claude | What did this session actually send, and what did it cost? |
shim install claude | Mask secrets and personal data in eligible tool results, every session, automatically. |
[!WARNING]
shim-cli is a best-effort guard, not a data-loss prevention boundary. Read the privacy limitations before
using it with sensitive data.
Measure a session
shim watch puts a local proxy in front of the client for one command, forwards
every byte unchanged, and reports what went past:
shim watch -- claude
shim watch -- claude -p "explain this repo"