Repository navigation
v1.2.1: Merge pull request #65 from GetSHIM/launch/4-release-1.2.1
shim-cli 1.2.1
1.2.1 fixes what three simulated first-time users and a literal copy-paste run
of the README and the cookbook tripped over in their first ten minutes on
1.2.0. The hook decides and masks exactly as in 1.2.0, so the detector and the
hook protocol are unchanged. The changes are in what the CLI prints, the
README's first screen and the cookbook.
Upgrading is uv tool upgrade shim or pipx upgrade shim, or
/plugin update shim-cli@shim-cli in Claude Code. shim install writes the
same entries as in 1.2.0.
What the CLI says now
shim demo <client>shows the synthetic sentence before and after
masking, then what that client does by default with a prompt or a tool result
like it. It used to print the same masked line for every client, though
Claude Code and Codex report a typed prompt and do not change it.--jsonis
unchanged.shim doctorwith nothing installed saysNo shim hook is installed, so nothing is inspected twice.It used to sayExactly one shim hook path is installed.shim install claudeno longer warns that existing hooks will be
preserved when the settings file has no hooks. Most Claude Code users already
have asettings.json, so most first installs printed a warning that was not
true. It now ends with the next step,Start a new Claude Code session; /hooks lists shim., andshim install copilotwithStart a new GitHub Copilot CLI session; it has no trust step.- A client settings file that does not parse is named with Python's JSON
error and its line and column, byinstall,revert,statusanddoctor:
~/.claude/settings.json is not valid JSON: Expecting value at line 1, column 10.They used to say only that the configuration could not be changed
safely. shim watchprints a two-line report when no request went through the
proxy, for example because the client was not signed in:shim watch — 1s, 0 requestsandno request reached the model provider through the proxy. It
used to print nothing after its first line.shim redactends its output the way the input ended. It used to add a
newline, soshim redact < file > copygave a file with a blank last line.
What a visitor reads
The README opens with a quickstart and a list of what shim cannot do. The
quickstart is install, shim demo claude and shim install claude. The list
says that a prompt typed into Claude Code or Codex is not masked, that Codex
and GitHub Copilot CLI tool traffic is not inspected, that VS Code masks
nothing, which Claude Code events are only reported, and that Windows is not
supported. The install example is Claude-first, and the four screenshots are
recaptured from this release's output.
The cookbook now warns about four traps. A second [mode] header makes the
settings file invalid. --reset turns off a ledger you turned on. Claude Code
puts email addresses of its own into a session, so shim watch counts them.
Pasting the redacted-prompt line makes Claude Code ask once to read a temporary
file.
A contract test checks every shim command in the README, the plugin README,
the cookbook, the command reference, the findings page and llms.txt against
the CLI's own commands and flags. It checks 259 lines.
The repository has issue forms, a bug report and a detection report, and a
pull request template. CONTRIBUTING.md says why bin/shim.pyz is rebuilt
only in a release commit. The Claude Code plugin installs from main, so an
archive rebuilt between releases ships unreleased code to plugin users.
What to check after upgrading
- Scripts that read
shim redact: the trailing newline is no longer added.
Input that ends with one still gets it. - Scripts that read
shim demotext: it now hasbeforeandafterlines
and a sentence about the client. Readshim demo <client> --jsoninstead. - Scripts that read JSON errors:
CLIENT_SETTINGS_MALFORMED'serrornow
ends with the file and the JSON error. Matchcode, nevererror. - Downgrading: a shim-cli older than 1.2.0 refuses a settings file that
holdsmarkersor whosedietnameshtml, and while it is refused the
prompt hook withholds every prompt. Remove both keys before you downgrade.