CLI and flags
One binary, redactproxy. The commands you run are launch, login, discover, approvals and completion. The rest run inside the containers.
Commands#
| Command | What it does |
|---|---|
launch | Scrubs the workspace, builds the agent image, starts the sandbox, runs the self-test. |
login [-agent-base] | Gets the sandbox its own Claude subscription token and stores it in the Keychain. |
discover | Lists values in the workspace's configuration worth treating as secrets. |
approvals | Lists and decides queued put-backs, between sessions. |
completion bash|zsh | Prints a shell completion script. |
launch#
redactproxy launch -workspace . -policy-file policy.json| Flag | Default | Meaning |
|---|---|---|
-workspace | . | The workspace the agent works in, at /workspace. |
-policy-file | required | The policy. |
-state-dir | ~/.redactproxy/<project> | Where the store, the CA and the Compose file live. |
-proxy-image | redactproxy-proxy:latest | The proxy image (make images). |
-agent-base | redactproxy-agent-base:latest | The agent's base image; the CA is added on top. Its label redactproxy.agent.command names the command the launcher tells you to run. |
-env-file | The agent's environment, NAME=value lines, scrubbed before use. | |
-mount host:agent | A credential file the agent gets as a scrubbed, read-only copy. Repeatable. | |
-ssh-key | An unencrypted SSH private key for the agent's ssh-agent socket. The key stays in the proxy. Repeatable. | |
-upstream | https://api.anthropic.com | Anthropic API base URL. |
-upstream-ca-file | PEM certificates of private CAs for allowlisted hosts. | |
-allowed-url | An allowlisted HTTPS URL; the self-test checks which tools trust the proxy CA against it. |
The launcher passes your host's effective git identity for that repository (user.name, user.email) to the proxy's git as the committer.
login#
redactproxy loginRuns claude setup-token in a container of the agent base image (-agent-base, default redactproxy-agent-base:latest). You sign in through the link, then paste the token once; it goes into the Keychain (service redactproxy, account claude-oauth-token). A first launch without credentials runs this itself when you're at a terminal.
discover#
redactproxy discover -workspace .
redactproxy discover -workspace . -kube-context my-context
redactproxy discover -workspace . -out declared.json- Reads dotenv files, connection strings in
appsettingsfiles, and configuration and Kubernetes files by where they sit. With-kube-context, also the Secrets of that kubectl context. - Prints the source, the key and the length of each value, and a count. Never the value.
- Warns about file names that look like personal data: the agent sees file names as they are.
-outwrites the values as a declared-secrets file (a JSON array), readable by you only, and never overwrites one. It holds the values in clear: keep it out of the workspace.
launch does not read a declared-secrets file; only the proxy's own -declared-file flag does.
approvals#
redactproxy approvals -store <state>/store.bin -store-key-file <file> -container-id <id> list
redactproxy approvals -store <state>/store.bin -store-key-file <file> -container-id <id> approve N
redactproxy approvals -store <state>/store.bin -store-key-file <file> -container-id <id> deny NRuns while no proxy is using the store. -store-key-file holds the store key as 64 hex characters; the container ID is in <state>/container-id. See approvals.
Inside the containers#
These are run by the images and the launcher, not by you: firewall, routes, scrub, selftest, unpack gitpack|gzip|zip, health. With no subcommand, redactproxy is the proxy itself; the launcher sets its flags (-listen, -dns-listen, -gateway-listen, -git-listen, -policy-file, -store, -store-key-file and others). Two worth knowing: -declared-file (declared secrets) and -dump-limit (personal-data values per tool result before it is withheld, default 50).
Make targets#
| Target | What it does |
|---|---|
make build | go build -o bin/redactproxy ./cmd/redactproxy |
make images | Builds redactproxy-proxy:latest and redactproxy-agent-base:latest. |
make test | go test ./... |
make test-linux | The test suite in a Linux container, then the firewall rules and routes in real network namespaces. |
make e2e | End to end: the launcher, both containers and the routes helper. |
make e2e-services | End to end against local images of Grafana, Meilisearch, PostgreSQL, MongoDB and SQL Server. The HTTP services work; database logins with a marker password are a recorded gap. |
up, up-real, down, logs, try, demo, agent and secrets drive an older development setup in compose.yaml (LLM path only, mock upstream, no gateway). They are not how the product runs; use launch.