Interactive setup wizard that detects your project type, generates CA certificates, creates aDocumentation Index
Fetch the complete documentation index at: https://docs.codezero.io/llms.txt
Use this file to discover all available pages before exploring further.
cordon.toml config file, and provides language-specific trust guidance.
Usage
Options
| Option | Description |
|---|---|
--config, -c | Path to cordon.toml (default: ./cordon.toml) |
--yes | Skip confirmation prompts (useful for automation and non-interactive setup) |
--regenerate-ca | Regenerate the CA certificate |
--trust | Add CA to system trust store |
--no-trust | Skip trust store prompt |
Examples
Project setup and services
Cordon is project-first. By default, each project has its owncordon.toml with its own routes and credentials. A user scope is also available for tools that operate across projects.
cordon setup writes ./cordon.toml in the current directory by default, or to the path specified by --config. Certificates are stored under ~/.config/cordon/projects/<namespace>/certs/, outside the project tree.
Setup does not install a background service. To run cordon as a launchd/systemd service for a project, install the service explicitly after setup:
Integration subcommands
Integrations configure cordon for a specific tool — setting up the proxy env vars and CA trust settings that the tool needs. Each integration knows where its target stores configuration (e.g.,settings.json for Claude Code, ~/.codex/.env for Codex, ~/.hermes/.env for Hermes) and handles setup and teardown automatically.
Currently supported: claude-code, codex, hermes.
cordon setup claude-code
Configure cordon for Claude Code. Runs the base setup automatically, then generates a combined CA bundle and writes proxy env vars to Claude Code’s settings.json.
cordon integration.
| Option | Description |
|---|---|
--config, -c | Path to cordon.toml (default: ./cordon.toml) |
--yes | Skip confirmation prompts (useful for automation and non-interactive setup) |
--trust | Add the CA cert to the OS trust store |
--no-trust | Skip trust store prompt |
--regenerate-ca | Regenerate the CA certificate |
--service | Install cordon as a background service at the end of setup |
--no-service | Skip the end-of-setup service install prompt |
--service and --no-service are mutually exclusive.
cordon setup codex
Configure cordon for OpenAI Codex. Runs the base setup automatically, then writes proxy env vars to Codex’s .env and shell_environment_policy.set entries to Codex’s config.toml.
cordon integration.
| Option | Description |
|---|---|
--config, -c | Path to cordon.toml (default: ./cordon.toml) |
--yes | Skip confirmation prompts (useful for automation and non-interactive setup) |
--trust | Add the CA cert to the OS trust store |
--no-trust | Skip trust store prompt |
--regenerate-ca | Regenerate the CA certificate |
--service | Install cordon as a background service at the end of setup |
--no-service | Skip the end-of-setup service install prompt |
--service and --no-service are mutually exclusive.
Codex uses reqwest with rustls for HTTP/TLS. Setup generates a combined CA bundle (system CAs + Cordon CA) and sets SSL_CERT_FILE, REQUESTS_CA_BUNDLE, and CURL_CA_BUNDLE to point at it in both .env and config.toml.
Codex filters out
CODEX_* prefixed variables from its .env file, so the setup uses SSL_CERT_FILE instead of CODEX_CA_CERTIFICATE. The CODEX_HOME env var can override the default ~/.codex/ path. For project scope, set CODEX_HOME="$PWD/.codex" if you want Codex to load the project-local .env for its own startup-time network traffic.cordon setup hermes
Configure cordon for Hermes Agent. Runs the base setup automatically, then builds a combined CA bundle and writes proxy env vars to Hermes’s ~/.hermes/.env.
cordon integration.
| Option | Description |
|---|---|
--config, -c | Path to cordon.toml (default: ./cordon.toml) |
--yes | Skip confirmation prompts (useful for automation and non-interactive setup) |
--trust | Add the CA cert to the OS trust store |
--no-trust | Skip trust store prompt |
--regenerate-ca | Regenerate the CA certificate |
--service | Install cordon as a background service at the end of setup |
--no-service | Skip the end-of-setup service install prompt |
--service and --no-service are mutually exclusive.
Hermes uses Python’s httpx library, which honors HTTPS_PROXY by default. Setup generates a combined CA bundle (system CAs + Cordon CA) because Python’s SSL_CERT_FILE replaces the default cert store rather than appending to it. REQUESTS_CA_BUNDLE is also set for the requests library.
The
HERMES_HOME env var can override the default ~/.hermes/ path. If the directory doesn’t exist, setup will warn but still write the .env file.What setup does
Runningcordon setup without an integration performs the base setup only:
- Checks platform dependencies — verifies that secret providers can function at runtime (e.g., D-Bus session on Linux for keyring, 1Password CLI sign-in status). Issues are reported as warnings but do not block setup.
- Detects the project type and language ecosystem
- Generates CA certificates at
~/.config/cordon/projects/<namespace>/certs/ - Detects available secret providers and adds them to the config (OS Keyring, 1Password CLI)
- Creates
cordon.tomlwith absolute cert paths - Provides language-specific trust guidance (e.g.,
NODE_EXTRA_CA_CERTSfor Node.js)
Node.js does not use the system trust store. You must also set
NODE_EXTRA_CA_CERTS to the absolute path of your CA certificate (found in cordon.toml under tls.ca_cert_path).Certificate storage
Certificates are stored outside your project directory, so they are not at risk of being committed to git with your app code.| Scope | Path |
|---|---|
| Project setup | ~/.config/cordon/projects/<namespace>/certs/ |
<namespace> is derived from your project directory: <dirname>-<short hash> (e.g., my-app-a1b2c3d4). The hash is the first 8 hex characters of the SHA-256 of the absolute path, so two projects named my-app in different locations get separate cert stores.
The CA private key is written with 0600 permissions (owner-only read/write).
The CA private key is only useful for interception where the CA is still trusted, whether through the system trust store or an app-specific trust configuration such as
NODE_EXTRA_CA_CERTS or a custom Java trust store.Multiple projects
Each project gets its owncordon.toml with its own listen port, routes, and certificate namespace. If you run Cordon in multiple projects simultaneously, each instance must listen on a different port:
Removal recipes
To disable an integration, seecordon integration disable.
To remove cordon itself from a machine after all integrations are disabled:
If you’ve already deleted
cordon.toml and the cert files, cordon untrust won’t be able to locate the CA to remove. In that case, remove it manually — on macOS, open Keychain Access and search for “cordon”; on Linux, remove the cert from /usr/local/share/ca-certificates/ and run update-ca-certificates.