Integration Guide

Zero-Trust Claude Code Integration

Claude Code sends your codebase to Anthropic. Pretense sits in the request path, mutating every identifier before it leaves your machine.

under 10msadded latency
Local-firstnothing leaves your machine
5 minsetup time
Byte-exactreversal guaranteed

How to Protect Claude Code in 3 Steps

One environment variable. No code changes. No workflow disruption.

01

Start Pretense Proxy

Run pretense start. The proxy starts on localhost:9339 and intercepts Anthropic API calls.

02

Set Base URL

Export ANTHROPIC_BASE_URL=http://localhost:9339. Claude Code now routes through Pretense.

03

Full Reversal

Claude Code responses are reverse-mutated. You see real variable names. Anthropic never does.

What Claude Code Actually Sends to the LLM

Pretense transforms your real identifiers into synthetic tokens before transmission. The LLM sees structure and logic, not your proprietary names.

Without Pretense: raw identifiers exposed
// Before Pretense mutation
async function getUserPaymentToken(userId: string) {
  return await stripeClient.createToken(userId, STRIPE_SECRET);
}

Your function names, secrets, and architecture are transmitted verbatim.

With Pretense: synthetic identifiers only
// After Pretense mutation (what the LLM sees)
async function _fn4a2b(_v8c3d: string) {
  return await _v2f1a._fn9e4b(_v8c3d, _v7d2c);
}

Structure intact. LLM quality preserved. Your IP stays private.

After the LLM responds, Pretense reverses every mutation. You receive real, working code with your original identifiers restored byte-for-byte.

Quick Setup for Claude Code

terminal
$ ANTHROPIC_BASE_URL=http://localhost:9339 claude
$ pretense init
$ pretense start
NOTE

Set ANTHROPIC_BASE_URL=http://localhost:9339 before launching Claude Code

Frequently Asked Questions

Does this work with Claude Code hooks?

Yes. Pretense includes native Claude Code hooks for PreToolUse, PostToolUse, and UserPromptSubmit.

What about streaming responses?

Pretense supports SSE streaming with rolling-buffer mutation. No lag on streamed completions.

Can I use Pretense with the Claude API directly?

Yes. Any app using ANTHROPIC_BASE_URL works transparently through Pretense.

Protect Claude Code in 5 Minutes

No code changes. No workflow disruption. One environment variable and Pretense intercepts every request.

No credit card required. 30-second setup. Local-first, nothing leaves your machine.

Ask me anything