redact-proxy pre-release
Docs menu

Quickstart

From a clone of the repository to Claude Code running in the sandbox. Every command here is in the repository's Makefile or the redactproxy binary.

Platform

Tested on macOS with Docker Desktop only, with Docker 29.5 and Compose 5.1. The launcher uses the macOS Keychain and needs macvlan networks. Native Linux is untested, Windows is not supported, rootless Docker does not work. See platform support.

Prerequisites#

1. Build the binary#

shell
make build    # go build -o bin/redactproxy ./cmd/redactproxy

2. Build the images#

shell
make images

This builds two images:

3. Sign the sandbox in#

shell
bin/redactproxy login
  1. It runs claude setup-token in a container of the agent base image, on your terminal. Claude Code shows a link; sign in and paste the code.
  2. Paste the token it then shows, once. It isn't echoed.
  3. The launcher stores it in the macOS Keychain: service redactproxy, account claude-oauth-token. It is never written to a file on the host.

This step is optional: a first launch without any credential runs it by itself when you're at a terminal. The sandbox's login is its own. Claude Code's login on your host is not read or changed. The token is valid for one year; run login again when it expires.

API key instead

The launcher also reads an Anthropic API key from the Keychain account anthropic-api-key (same service). With both present, the subscription token is used. There is no redactproxy command that stores an API key yet.

Subscription terms

Whether Anthropic's terms allow a subscription token to be used through a proxy like this is not settled. The risk is yours.

4. Pick a policy#

The policy names the destinations the agent may reach. deploy/default-policy.json allows the public package registries (npm, Yarn, PyPI, the Go proxy, crates.io, RubyGems, Maven, Gradle, NuGet, Packagist) and nothing else. Copy it and add the hosts your task needs:

policy.json
{
  "mode": "default",
  "allow": [
    "registry.npmjs.org",
    "api.stripe.com"
  ]
}

Unknown keys are errors, so a misspelled key can't silently drop a rule. The full reference is on the policy page.

5. Launch#

shell
bin/redactproxy launch -workspace . -policy-file deploy/default-policy.json

In order, the launcher:

  1. Takes Claude's credential from the Keychain (with none, it runs login), then the store key, creating it on first use.
  2. Refuses to start if this workspace's sandbox is already running, and tells you how to stop it.
  3. Loads or creates the proxy CA, then scrubs the workspace's secret files, the -env-file and any -mount files into an overlay of marker copies and stand-ins.
  4. Builds the agent image from the base image with the CA installed in its trust stores.
  5. Writes the Compose file to the state directory and starts both containers.
  6. Runs the routes helper, then the self-test, and prints each check. Any failure stops the sandbox.
  7. Prints the hosts it won't inspect, if your policy has passthrough entries, then the command to attach.
output, last line
ready. Use it with: docker compose -p rp-<workspace>-<6 hex> -f ~/.redactproxy/<project>/compose.json exec agent claude

The project name is rp-, the workspace folder's name and a short hash of its path. The state directory (-state-dir, default ~/.redactproxy/<project>) holds the encrypted store, the encrypted CA and the Compose file.

6. Attach#

Run the command the launcher printed. Claude Code starts in /workspace, with its first-run screens already marked done.

7. Stop#

shell
docker compose -p <project> -f ~/.redactproxy/<project>/compose.json down

Name the generated Compose file with -f (it is in the state directory; use your -state-dir if you set one). Without it, Compose run from the repository clone would load the clone's own compose.yaml, an old development setup. There is no redactproxy subcommand for this. The store and CA stay in the state directory, so the next launch gives the same values the same markers and stand-ins.

Next steps#