Skip to main content
Print the environment variables a consumer needs to route traffic through cordon. Use the output in your shell, .envrc (direnv), .mise.toml, or any tooling that consumes env vars.

Usage

cordon env [OPTIONS]

Options

OptionDescription
--scopeConfiguration scope: project (default) or user
--config, -cPath to cordon.toml (overrides scope-resolved path)
--formatOutput format: shell (default), fish, dotenv, json

Examples

Interactive shell (bash / zsh):
eval "$(cordon env)"
fish:
cordon env --format fish | source
direnv (.envrc):
eval "$(cordon env)"
mise (.mise.toml):
cordon env --format dotenv > .mise.cordon.env
JSON for scripting:
cordon env --format json | jq .HTTPS_PROXY

Output

Vars emitted:
  • HTTPS_PROXY / HTTP_PROXY (plus lowercase) — http://127.0.0.1:<port>, port from cordon.toml.
  • NODE_EXTRA_CA_CERTS — absolute path to the Cordon CA cert. Node.js expects a raw cert, not a bundle.
  • SSL_CERT_FILE / REQUESTS_CA_BUNDLE / CURL_CA_BUNDLE — absolute path to the combined (system + Cordon) CA bundle. These env vars replace the default trust store, so a bundle is required.

Errors

  • no cordon.toml at <path> — run \cordon setup` first` — no config at the resolved scope path.
  • Bundle vars are omitted (with a comment) if combined-ca.pem is missing; run cordon setup to generate it.

See also

  • cordon setup — generates the config and CA bundle this command depends on.