LocalMask — mask secrets before any AI sees your code
100% local. LocalMask scans your repo for secrets & PII, replaces them with
opaque tokens (~[PASSWORD_0]~), and keeps the real values on your machine.
Your AI assistant — Copilot, Cursor, Claude, anything — only ever sees the
masked view.
Prompt Builder demo

Open any file, press Cmd+Alt+M — LocalMask masks every secret, shows a side-by-side editor with the prompt panel, and lets you copy a safe prompt to any AI. Paste the AI's response back and click Rehydrate to restore real values.
Watch the full demo (1:50)
Core features
- 🛡 Shield (status bar) — scan, sync, approve all, publish masked mirror,
review, teach, install commit hook. Live badge:
14 findings · ⏳ 3 to review.
- 🔑 Key toggle (
Cmd+Alt+K) — flip any file between real values and the
masked view (what the AI sees). Reflects review decisions instantly.
- Prompt Builder (
Cmd+Alt+M) — select code, mask it, compose a prompt
with system instructions and a question, copy it ready for any AI chat.
Cancellable progress bar with live status. Approve, reject, or teach
detections right inside the builder. Rescan after edits.
- Rehydrate clipboard — paste an AI response containing
~[TOKEN]~
placeholders, run Rehydrate, and the real values are restored locally.
Review & approve
- Review sidebar — tree view of every finding grouped by file or token type,
click to jump, approve/reject inline, whole-file decisions.
- Problems panel + quick fixes — pending detections as warnings; lightbulb
→ Approve masking / Reject — false positive (your reason teaches the
local model).
- Inline highlights — detected lines tinted by state: pending / 🛡 masked /
○ kept readable.
- Right-click 🛡 menu — approve/reject on current line, mark selection as
secret, compare real vs masked, teach a missed secret.
More
- ⇄ Compare — real vs masked side by side in the diff editor.
- Sync on save — masked store follows your edits automatically.
- Teach types — mark any selection as a secret with a custom type
(e.g.
CUSTOMER_ID). Value passes over stdin — never argv, never any AI.
- Commit hook — auto-sync the masked mirror on every commit.
- Publish — push a fully masked mirror to a local path or git remote.
Works in
VS Code, Cursor, Windsurf, VSCodium (same extension). The AI-chat
side works in every MCP-capable client — Claude Code, Claude Desktop, Copilot,
Zed — via localmask mcp-install.
Privacy model
Everything runs on your machine over stdio. No accounts, no network calls,
no telemetry. The AI sees tokens; you keep the values.
| |