Skip to content

Environment Variables

All environment variables recognised by clido.

VariableDescription
ANTHROPIC_API_KEYAnthropic API key. Used when the active profile has api_key_env = "ANTHROPIC_API_KEY" or no api_key_env and provider is anthropic.
OPENAI_API_KEYOpenAI-compatible API key. Used when provider is openai and api_key_env is not set.
OPENROUTER_API_KEYOpenRouter API key. Used when provider is openrouter and api_key_env is not set.

Any custom environment variable name can be set in a profile’s api_key_env field:

[profile.my-provider]
provider = "openai"
api_key_env = "MY_CUSTOM_KEY"
VariableDefaultDescription
CLIDO_CONFIGPlatform config dir + /config.tomlOverride the config file path. Can be absolute or relative.
CLIDO_DATA_DIRPlatform data dirOverride the data directory (sessions, memory DB, audit logs).

These variables mirror CLI flags. CLI flags take precedence over environment variables.

VariableCLI equivalentDescription
CLIDO_MODEL--modelModel name override
CLIDO_PROVIDER--providerProvider override
CLIDO_PROFILE--profileProfile name
CLIDO_WORKDIR--workdirWorking directory
CLIDO_MAX_TURNS--max-turnsMaximum agent turns
CLIDO_MAX_BUDGET_USD--max-budget-usdMaximum cost in USD
CLIDO_PERMISSION_MODE--permission-modePermission mode (default, accept-all, plan)
CLIDO_OUTPUT_FORMAT--output-formatOutput format (text, json, stream-json)
CLIDO_INPUT_FORMAT--input-formatInput format (text, stream-json)
CLIDO_MAX_PARALLEL_TOOLS--max-parallel-toolsMax concurrent tool calls
CLIDO_SYSTEM_PROMPT--system-promptSystem prompt override
VariableDefaultDescription
NO_COLORunsetWhen set to any non-empty value, disables ANSI color output. Also respected by --no-color flag. Follows the no-color.org convention.
TERMUsed to detect terminal capabilities. clido respects TERM=dumb to disable color.
VariableDefaultDescription
CLIDO_LOGinfoLog filter for tracing. Examples: debug, clido_agent=debug, warn.
RUST_LOGStandard Rust log filter (fallback when CLIDO_LOG is not set).
Terminal window
export ANTHROPIC_API_KEY="$SECRET_KEY"
export CLIDO_MAX_TURNS=20
export CLIDO_MAX_BUDGET_USD=0.50
export CLIDO_PERMISSION_MODE=accept-all
clido --output-format json "fix all clippy warnings"
Terminal window
CLIDO_CONFIG=./ci/clido.toml clido "run smoke tests"
Terminal window
CLIDO_LOG=debug clido "test prompt" 2>debug.log
Terminal window
NO_COLOR=1 clido --output-format json "list files"