Get cordon running and proxying your first API request in 5 minutes.
This guide walks you through setting up cordon to proxy requests to an API — in this case, the Anthropic API — with credentials injected from 1Password.Cordon is project-based — each project gets its own config and routes. Running cordon setup in a project directory creates a cordon.toml there with the project’s route policy, while CA certificates are stored outside the project tree at ~/.config/cordon/projects/<namespace>/certs/ so they are never accidentally committed. If you run Cordon in multiple projects simultaneously, each needs a different port — see setup for details.
The setup command generates CA certificates, creates a config file, and walks you through adding your first route and secret source — all in one step.
cordon setup
The wizard will:
Generate CA certificates at ~/.config/cordon/projects/<namespace>/certs/
Create a cordon.toml in the current directory with working TLS paths
Prompt you to add a route (API host, auth type, and secret source)
For keyring-backed routes, show the cordon secret set <route-name> command to store the credential
You can add more routes later with cordon route add, or edit cordon.toml directly.
In non-interactive mode (--yes), setup skips the route wizard. Use cordon route add afterward to configure routes. For keyring-backed routes, also run cordon secret set <route-name> to store the credential — 1Password routes resolve secrets automatically. See Routes for all auth types and Secret Sources for provider configuration.
For HTTPS interception to work, your system needs to trust the proxy’s CA certificate.
cordon trust
This adds the CA to your system trust store (macOS Keychain or Linux ca-certificates). Most tools — curl, gh, Go, Rust, Python, Ruby — will then trust the proxy automatically.
Node.js does not use the system trust store. You must set the NODE_EXTRA_CA_CERTS environment variable to the absolute path of your CA certificate (the tls.ca_cert_path value from cordon.toml):
Set these variables in the shell where you run your app (or in a wrapper like a Procfile/direnv), rather than exporting them globally for your entire system unless that is intentional.
Your app does not need to send a real auth header. Cordon injects credentials on matched routes. If an SDK requires an auth header field to be present, send a dummy placeholder and Cordon will strip and replace it.
Testing without system trust: If you haven’t run cordon trust yet, you can test with curl by passing the CA cert directly: