Open source (MIT), zero telemetry

Your secrets never
leave your machine

cloak sits between Claude Code, Cursor, aider — any coding agent — and your model provider. It redacts credentials and PII from every request before it leaves your machine, and restores them transparently in the response. Your agent never loses context. The provider never sees the real values.

No account needed to read this page. We don't load a single third-party script either.

The problem

Your agent reads everything. So does the model provider.

Coding agents cat your .env files, grep your config, open old CSVs, and paste log output straight into context. All of it ships as plaintext to whichever provider you're using — not because anyone asked for it, but because that's just how reading a repo works.

AWS_ACCESS_KEY_ID STRIPE_SECRET_KEY customer@email.com -----BEGIN PRIVATE KEY----- internal-db.prod.local 4242 4242 4242 4242

How it works

One proxy. Redact out. Restore back.

  1. 1

    Point your agent at cloak

    Set ANTHROPIC_BASE_URL (or your provider's equivalent) to 127.0.0.1:8787. One command does it for you.

  2. 2

    Every request gets scanned

    Regex + entropy + checksum detection catches credential-shaped strings and PII — no ML dependency, sub-millisecond latency.

  3. 3

    Matches become placeholders

    Real values are swapped for tags like {{AWS_ACCESS_KEY_1}} and stashed in an in-memory, per-session vault. Nothing touches disk.

  4. 4

    The response comes back clean

    Placeholders are restored on the way back — streaming included — so your agent's output, edits, and tool calls look exactly like they always did.

Not just API keys

If an agent can read it, cloak protects it

Most of what ends up in an agent's context isn't a hardcoded credential — it's a spreadsheet, a support export, an old CSV someone asked for help cleaning up. All of it carries real people's data.

"Dedupe this list of signups for me"

jane.doe@gmail.com, 415-555-0148 {{EMAIL_1}}, {{PHONE_1}}

A customer list for a mail-merge or dedupe script carries real emails and phone numbers — gone the moment an agent reads the file into context.

"Why did this order fail?"

card declined: 4242 4242 4242 4242 card declined: {{CREDIT_CARD_1}}

A quick debugging session over a support ticket or payment log can paste a real, Luhn-valid card number straight into the conversation.

"Help me reformat this spreadsheet"

SSN: 523-44-1121 SSN: {{SSN_1}}

HR and payroll spreadsheets aren't "secrets" in the usual sense — they're exactly the kind of file people hand an agent to reformat or summarize.

What's in it

Built for how coding agents actually talk

Nothing written to disk

The vault mapping placeholders back to real values lives only in process memory, with an idle timeout. Turn cloak off and there's nothing left behind.

Works with your existing agent

Claude Code, Cursor, aider, Codex CLI — anything that honors a base-URL override. No plugin, no SDK, no code changes.

Credential-shaped detection

AWS, GitHub, Stripe, Slack, npm, SendGrid, Twilio, Anthropic/OpenAI keys, JWTs, PEM private key blocks — plus a generic high-entropy catch-all.

PII, checksum-validated

Email, phone, IPv4, credit cards (Luhn), IBANs (mod-97), SSNs, routing numbers (ABA) — validated, not just pattern-matched, to keep false positives down.

Streaming-safe, tool-call-safe

Placeholders are restored token-by-token as a response streams, including inside a tool call's arguments — so an agent writing a file back to disk never writes a literal placeholder tag into it.

Toggle without disconnecting

Flip redaction on or off instantly from the CLI or a menu-bar app, without restarting the proxy or breaking your agent's connection.

Setup

Three commands. Then it's invisible.

No config file, no account, no API keys of cloak's own — just one environment variable your agent already knows how to read. This is the exact setup early-access members get once their build is ready.

  1. 1

    Build it, point your agent at it

    go build -o cloak ./cmd/cloak
    ./cloak install -yes

    Detects your shell and writes the one line (ANTHROPIC_BASE_URL, or your provider's equivalent) your agent needs. That's the entire configuration surface.

  2. 2

    Start it

    ./cloak serve
    # or, to survive reboots:
    ./cloak service install

    Foreground to try it out, or install as a background service (launchd / systemd / Windows Run key) and forget about it.

  3. 3

    Keep working

    claude   # or cursor, aider, codex — unchanged

    Restart your terminal once so the new variable takes effect, then use your agent exactly as before. Toggle protection off anytime with cloak disable without losing the connection.

FAQ

Good questions

Does cloak see or store my real secrets?

Only in process memory, only for the lifetime of a session. The placeholder-to-value mapping is never written to disk. An optional local audit log can record that something was redacted and what kind it was — never the value, and never the mapping back to it.

Will this slow my agent down?

No — detection runs in well under a millisecond per request in our benchmark corpus, two to three orders of magnitude under the latency budget that would be noticeable.

Which providers does it support?

Anthropic's Messages API, OpenAI's Chat Completions API, and Google's Gemini API — JSON and streaming for all three.

Can I read the code myself?

Yes — cloak is MIT-licensed and the source is on GitHub. A tool that reads your secrets shouldn't ask you to trust a closed binary.