Install Cloakroom
Works with Claude Code, Codex CLI, Gemini CLI and Cursor (editor and command-line agent).
Mac, Windows and Linux. You need Claude Code, installed and signed in.
Add Cloakroom. Inside Claude Code, type these two lines, one at a time. If it asks where to install, pick the option for all your projects (user scope).
/plugin marketplace add shanjeevrajendran/cloakroom /plugin install cloakroom@cloakroomRestart Claude Code. Type
/exit, thenclaudeagain. Cloakroom now installs itself.Check it. Open a new terminal window and run:
cloakroom doctor # see the example below cloakroom dashboard # opens your alerts in the browserExample result:
ok python: 3.14.7 on Darwin arm64 ok version: cloakroom 1.4.0 ok mode: full ok vault key: OS secure store ... model: loading (the first run downloads it once, about 1 GB; that can take a minute or two) ok model: torch, loaded in 1.3 s, one check 17 ms (first check 704 ms, a one-time warm-up) ok service: up on port 37787, model loaded warn codex: not protected; to protect it: cloakroom install codex warn gemini: not protected; to protect it: cloakroom install gemini warn cursor: not protected; to protect it: cloakroom install cursor ok program: ~/.local/bin/cloakroomEvery line should say
ok, exceptwarnlines for agents you have not set up; each line says what to fix. Thevault keyline: the vault is Cloakroom’s encrypted file of the real values it hid, and “OS secure store” means its key sits in your system’s password store (Keychain on a Mac).
Mac and Linux (tested with Codex 0.164).
Install the program by hand.
uv tool install "cloakroom[model,torch,ocr]"The part in brackets adds the AI model that finds names and addresses on your machine, and reading text in screenshots and scans.
Run
cloakroom install codex. It adds four hooks (small checks Codex runs before and after each action) to~/.codex/hooks.jsonand leaves your own hooks alone.cloakroom install codexStart Codex (
codex), type/hooks, open each of the four Cloakroom hooks and trust it. Until you do, Codex skips them.cloakroom doctorshows whether they’re installed.
Mac and Linux (built against Gemini CLI 0.65).
Install the program by hand.
uv tool install "cloakroom[model,torch,ocr]"The part in brackets adds the AI model that finds names and addresses on your machine, and reading text in screenshots and scans.
Run
cloakroom install gemini. It writes one thing: a Gemini extension namedcloakroomin~/.gemini/extensions/cloakroom/. Yoursettings.jsonand your own hooks and extensions aren’t touched.cloakroom install geminiGemini runs the hooks (small checks before and after each action) from its next start, in every folder;
gemini extensions listshows it,cloakroom doctortoo.
Cursor’s editor and its command-line agent (agent). Tab completion isn’t covered. Mac and Linux.
Install the program by hand.
uv tool install "cloakroom[model,torch,ocr]"The part in brackets adds the AI model that finds names and addresses on your machine, and reading text in screenshots and scans.
Run
cloakroom install cursor. It adds nine hooks (small checks the agent runs before and after each action) to~/.cursor/hooks.jsonand leaves your own hooks alone.cloakroom install cursorCursor’s editor and its command-line agent (
agent) run them from their next start. Tab completion has no hook, so it isn’t covered, and the command-line agent doesn’t check the prompts you type; the editor does.cloakroom doctorshows whether they’re installed.
In an editor
Claude Code in VS Code or JetBrains: Cloakroom works as in the terminal. The VS Code extension runs Claude Code with your plugins, and the JetBrains plugin runs claude in the editor’s built-in terminal.
Codex in VS Code (OpenAI’s Codex extension): the extension’s own Codex reads the same ~/.codex/hooks.json, so it loads Cloakroom’s hooks. Trust them first in the codex command-line tool (type /hooks, as in the Codex steps above); the same Codex limits apply.
Gemini Code Assist in VS Code: Cloakroom does not protect you there. Its agent mode doesn’t run the hooks that Gemini extensions bring. Use the Gemini CLI in a terminal instead (VS Code’s own terminal is fine).
Antigravity, and editors not listed here: not supported. Cloakroom installs nothing there.
More in Known limits.
Updating
Claude Code: Claude Code updates the Cloakroom plugin, and the plugin then updates the cloakroom program the next time you start Claude Code. A plugin update comes out a few days after each new Cloakroom release. Claude Code only does this by itself if automatic updates are on for the place you added Cloakroom from (Claude Code calls it a marketplace). They’re on if you added Cloakroom from the plugin directory on claude.ai, and off otherwise. To switch them on:
In Claude Code, type
/pluginand press Enter.Go to the Marketplaces tab and choose cloakroom.
Choose Enable auto-update.
When an update arrives, Claude Code says “Run /reload-plugins”: type that, or restart Claude Code. To update right away instead, run this in a terminal:
claude plugin update cloakroom@cloakroom
Codex, Gemini CLI, Cursor, git commits, or a cloakroom you installed yourself: run cloakroom update in a terminal. It updates Cloakroom with the installer you used (uv, pipx or pip) and keeps the optional parts you had. Then it sets up Cloakroom’s checks again for Codex, Gemini CLI, Cursor and git commits, only where they were set up before.
Uninstall
In Claude Code:
/plugin uninstall cloakroom@cloakroom.Stop the service:
cloakroom statusshows if it runs; it stops when you log out, or end thepythonprocess listening on port 37787.Remove the program, with whatever installed it:
uv tool uninstall cloakroomorpipx uninstall cloakroom. If the plugin installed it without uv or pipx, it lives in~/.cloakroom/venvand step 4 removes it.Delete
~/.cloakroom(config, encrypted vault, labels, rules, logs).Delete the vault key: Keychain Access on macOS (search "cloakroom"), Credential Manager on Windows, or your Secret Service keyring on Linux.
Delete the downloaded model (about 1 GB): run
hf cache delete(orhuggingface-cli delete-cache) and pickperplexity-ai/PII-Tracer. Deleting only themodels--perplexity-ai--PII-Tracerfolder can leave the weights behind, since they may be stored as links to a shared folder.
Pick how you’ll run it
Easiest: add the plugin (above) and let it install Cloakroom on the next start. It uses uv or pipx if either is installed, otherwise a private Python environment in ~/.cloakroom/venv (needs Python 3.10+). If the install fails, Claude Code says so and it retries after 10 minutes. The table is for installing by hand.
| Your machine | Install | What you get |
|---|---|---|
| Apple Silicon Mac, or an NVIDIA GPU | uv tool install "cloakroom[model,torch]" | Full mode (keys plus names and addresses) on the GPU, about 20 ms per check |
| Any other machine (Intel Mac, most Windows and Linux) | uv tool install "cloakroom[model,torch]", then once: cloakroom export-onnx (saves a copy of the model that runs fast on a CPU) | Full mode on the CPU. Before the export it works but is slow (about 0.5 s per check); after it, about 60 ms on a modern CPU |
| Just trying it, or an automated build machine (CI) | uv tool install cloakroom and CLOAKROOM_MODE=rules | Rules only: instant, no model download, but misses names and personal data in ordinary sentences |
Add ocr inside the brackets to also read text in screenshots and scans. Without it, scans and pictures are held back.
pipx install ... works the same way as uv tool install .... The model extras need about 1 GB of disk on a Mac and up to about 4 GB elsewhere (mostly PyTorch). Python 3.10 or newer.
To try it on one project first, install the plugin for that folder only. From inside the folder:
claude plugin marketplace add shanjeevrajendran/cloakroom --scope local
claude plugin install cloakroom@cloakroom --scope local
Other projects stay untouched.
Using it outside Claude Code
The same engine works on any file or pipe, which is handy for checking what it would do:
cloakroom check config.py # what would be masked, by kind; never prints the values
cloakroom explain config.py # every finding with the rule that found it, and what was skipped as safe
cloakroom mask config.py # the masked text, as the agent would see it
cat app.log | cloakroom check - # read from stdin
cloakroom check --mode rules .env
Other commands: Commands.
Machines with no screen, automated builds (CI) and testing
# just trying it, or a CI machine: rules only, no model download
uv tool install cloakroom
CLOAKROOM_MODE=rules
- Vault key
- The vault is Cloakroom’s encrypted file of the real values it hid. Its key lives in your system’s password store (Keychain, Credential Manager, Secret Service). On a machine without one, set
CLOAKROOM_VAULT_KEY(a 256-bit key, base64 or 64 hex characters). Otherwise Cloakroom uses a key file only you can read, andcloakroom doctorsays so. - Dry run
CLOAKROOM_DRY_RUN=1lets everything through and logs what Cloakroom would have done to~/.cloakroom/dry-run.log. Useful for trying it on a real project before trusting it.- Separate homes
CLOAKROOM_HOMEmoves the config, vault and model files;CLOAKROOM_PORTmoves the local service (default 37787).
If something looks wrong
cloakroom not found
Open a new terminal. The program lives in ~/.local/bin (on Windows, %USERPROFILE%\.local\bin); the installer adds that folder to your shell profile (~/.zshenv for zsh, ~/.bashrc and ~/.profile or ~/.bash_profile for bash) or, on Windows, to your user PATH.
Still setting up, or it failed
Progress, and numbered steps when something needs you, are written to ~/.cloakroom/bootstrap.log. More in Setup.
A Linux machine without curl
When neither uv nor pipx is there, Cloakroom fetches uv, which needs curl or wget. If a Linux machine has neither, Cloakroom tells you the steps: sudo apt install curl (Ubuntu/Debian) or sudo dnf install curl (Fedora/RHEL), then restart Claude Code.
Intel Mac
Only the pattern rules run, so keys, cards and ID numbers are caught but most names and addresses are not. The AI model for names and addresses needs PyTorch or ONNX Runtime, and neither is built for Intel Macs.
More fixes
Blocked prompts, ports, model: FAIL and too much masking: Settings and fixes.