Skip to main content

Documentation Index

Fetch the complete documentation index at: https://cac.nextmind.space/docs/llms.txt

Use this file to discover all available pages before exploring further.

1

Install cac

npm install -g claude-cac
No setup command needed — cac auto-initializes on first use.
If you have Clash, Shadowrocket, Surge, sing-box or other proxy/VPN tools running locally, turn them off before using cac. TUN-mode proxy compatibility is still experimental and may cause connection conflicts. Even if a conflict occurs, cac will fail-closed (refuse to connect) rather than leak your real IP — your privacy is always protected.
2

Install a Claude Code version

cac claude install latest
Downloads the latest Claude Code binary with SHA256 verification. You can also install a specific version:
cac claude install 2.1.81
3

Create an environment

Every environment gets an isolated identity (UUID, hostname, MAC), its own .claude config directory, and auto-downloads the latest Claude Code version.
# Minimal — just identity isolation
cac env create personal

# With proxy
cac env create work -p 1.2.3.4:1080:user:pass

# With proxy + pinned version
cac env create work -p 1.2.3.4:1080:user:pass -c 2.1.81
The environment is automatically activated after creation — no separate activate step needed.
Proxy is optional. If you use an API key with a base URL, you don’t need -p at all. See API key users.
4

Run Claude Code

claude
The first time, type /login in Claude Code to complete OAuth. After that, just claude.To switch environments later: cac <name> (e.g. cac work).

What just happened?

When you activated work and ran claude, cac’s wrapper:
  1. Set CLAUDE_CONFIG_DIR to ~/.cac/envs/work/.claude/ (isolated config)
  2. Resolved the pinned Claude Code binary from ~/.cac/versions/2.1.81/claude
  3. Injected device fingerprint shims (hostname, UUID, MAC)
  4. Blocked telemetry endpoints via DNS guard + environment variables
  5. Routed traffic through your proxy (if configured)
  6. Launched the real Claude Code binary
All of this is invisible to Claude Code — it sees a normal environment.

Tips

  • Verify your setup: Run cac env check anytime to confirm your privacy protection is working. You can trust its results — if it says all green, you’re protected.
  • Check which claude you’re running: which claude shows whether you’re using the cac-managed wrapper (~/.cac/bin/claude) or the default system claude.
  • Automatic safety checks: Every time you start a new Claude Code session, cac automatically runs a quick check. If your environment or privacy has any issue, the session is terminated before any data is sent.
  • Network resilience: Proxy connections can be unstable. cac enforces strict proxy routing — if the proxy drops, traffic stops entirely rather than falling back to a direct connection. Your IP is never accidentally exposed.
  • Modify environments after creation: Use cac env set to change proxy or version without recreating the environment.

Next steps

Proxy setup

Protocol auto-detection, SOCKS5, share links.

Docker mode

Fully isolated container with TUN networking.