Skip to content

Environment Variables ​

Clanker reads the following environment variables. When both a config file value and an environment variable are set, the resolution order depends on the specific variable (see notes below).


AI Provider Keys ​

These variables provide API keys for the supported AI providers. Each can also be set in the config file under ai.providers.<name>.api_key or ai.providers.<name>.api_key_env.

NameDescriptionRequiredExample
OPENAI_API_KEYOpenAI API keyRequired if using the openai providersk-proj-abc123...
ANTHROPIC_API_KEYAnthropic API keyRequired if using the anthropic providersk-ant-api03-abc123...
GEMINI_API_KEYGoogle AI Studio (Gemini) API keyRequired if using the gemini-api providerAIzaSy...
DEEPSEEK_API_KEYDeepSeek API keyRequired if using the deepseek providersk-abc123...
COHERE_API_KEYCohere API keyRequired if using the cohere providerabc123...
MINIMAX_API_KEYMiniMax API keyRequired if using the minimax providereyJ...
CLANKER_CLOUD_AUTH_TOKENClanker Cloud auth tokenRequired if using the clanker-cloud provider and configured through api_key_envck_...

AWS Variables ​

NameDescriptionRequiredExample
AWS_PROFILEAWS CLI profile to use for infrastructure queriesNo (can be set in config or via --profile)my-dev-profile
AWS_REGIONAWS region overrideNo (falls back to profile config, then us-east-1)us-west-2
AWS_DEFAULT_REGIONFallback AWS region if AWS_REGION is not setNous-east-1

AWS authentication is handled through local CLI profiles (aws configure --profile <name>), not through raw access key environment variables in Clanker's own configuration. However, standard AWS SDK environment variables like AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are respected by the underlying AWS CLI.


Clanker Backend Variables ​

These variables configure integration with the Clanker backend service for credential storage and retrieval.

NameDescriptionRequiredExample
CLANKER_BACKEND_API_KEYAPI key for authenticating with the Clanker backendNo (or set via --api-key flag)ck_live_abc123...
CLANKER_BACKEND_ENVBackend environment: testing, staging, or productionNo (default: testing)production
CLANKER_BACKEND_URLCustom backend URL; overrides the CLANKER_BACKEND_ENV selectionNohttps://api.clanker.example.com

DigitalOcean Variables ​

NameDescriptionRequiredExample
DO_API_TOKENDigitalOcean API tokenRequired if using DigitalOcean and not set in configdop_v1_abc123...
DIGITALOCEAN_ACCESS_TOKENAlternative DigitalOcean API token variableNo (fallback if DO_API_TOKEN is not set)dop_v1_abc123...

Hetzner Variables ​

NameDescriptionRequiredExample
HCLOUD_TOKENHetzner Cloud API tokenRequired if using Hetzner and not set in configabc123...

GitHub Variables ​

NameDescriptionRequiredExample
GITHUB_TOKENGitHub personal access tokenNo (can be set in config under github.token)ghp_abc123...

For the github-models AI provider, Clanker uses the token from gh auth token (the GitHub CLI) rather than this environment variable.


Sentry Variables ​

NameDescriptionRequiredExample
SENTRY_AUTH_TOKENSentry User Auth TokenRequired if using clanker sentry and not set in configsntrys_...
SENTRY_ORGSentry organization slugRequired if using clanker sentry and not set in configmy-org
SENTRY_PROJECTDefault Sentry project slugNoapi
SENTRY_HOSTSentry host; defaults to sentry.ioNosentry.io

Linear Variables ​

NameDescriptionRequiredExample
LINEAR_API_KEYLinear Personal API KeyRequired if using clanker linear and not set in configlin_api_...
LINEAR_WORKSPACE_IDOptional Linear workspace UUIDNoxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
LINEAR_TEAMDefault team keyNoENG

Notion Variables ​

NameDescriptionRequiredExample
NOTION_API_KEYNotion internal integration tokenRequired if using clanker notion and not set in configntn_...
NOTION_DATABASE_IDDefault Notion database IDNoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Cloudflare Variables ​

NameDescriptionRequiredExample
CLOUDFLARE_API_TOKENCloudflare API tokenRequired if using Cloudflare and not set in configabc123...
CF_API_TOKENAlternative Cloudflare API token variableNo (fallback)abc123...
CLOUDFLARE_ACCOUNT_IDCloudflare account IDNo (some operations work without it)abc123def456...
CF_ACCOUNT_IDAlternative Cloudflare account ID variableNo (fallback)abc123def456...

GCP Variables ​

NameDescriptionRequiredExample
GCP_PROJECTGCP project IDNo (can be set in config under infra.gcp.project_id)my-project-123
GOOGLE_CLOUD_PROJECTAlternative GCP project ID variableNo (fallback)my-project-123
GCLOUD_PROJECTAlternative GCP project ID variableNo (fallback)my-project-123

For the gemini provider (Vertex AI), GCP Application Default Credentials are used. Run gcloud auth application-default login to configure them.


Azure Variables ​

NameDescriptionRequiredExample
AZURE_SUBSCRIPTION_IDAzure subscription IDNo (can be set in config or via --azure-subscription)xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
AZ_SUBSCRIPTION_IDAlternative Azure subscription ID variableNo (fallback)xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Vercel Variables ​

NameDescriptionRequiredExample
VERCEL_TOKENVercel API tokenRequired if using Vercel and not set in config...
VERCEL_API_TOKENAlternative Vercel token variableNo...
VERCEL_TEAM_IDTeam ID for team-scoped accountsNoteam_...
VERCEL_ORG_IDAlternative team/org ID variableNoteam_...

Fly.io Variables ​

NameDescriptionRequiredExample
FLY_API_TOKENFly.io API tokenRequired if using Fly.io and not set in configFlyV1 ...
FLY_ACCESS_TOKENAlternative Fly.io token variableNoFlyV1 ...
FLY_ORGFly.io organization slugNopersonal
FLY_ORG_SLUGAlternative organization slug variableNomy-org

Railway Variables ​

NameDescriptionRequiredExample
RAILWAY_API_TOKENRailway account API tokenRequired if using Railway and not set in config...
RAILWAY_WORKSPACE_IDRailway workspace/team IDNo...

RAILWAY_TOKEN is intentionally not used because it is often a project deploy token, not the account token needed for API inventory.


Verda Variables ​

NameDescriptionRequiredExample
VERDA_CLIENT_IDVerda API client IDRequired if using Verda and not set in config...
VERDA_CLIENT_SECRETVerda API client secretRequired if using Verda and not set in config...
VERDA_PROJECT_IDVerda project IDRequired for project-scoped operations...

Tencent Cloud Variables ​

NameDescriptionRequiredExample
TENCENTCLOUD_SECRET_IDTencent Cloud CAM secret IDRequired if using Tencent Cloud and not set in configAKIDabc123...
TENCENTCLOUD_SECRET_KEYTencent Cloud CAM secret keyRequired if using Tencent Cloud and not set in configabc123...
TENCENTCLOUD_REGIONDefault Tencent Cloud regionNo (falls back to ap-singapore)ap-singapore
TENCENT_SECRET_IDAlternative Tencent Cloud secret ID variableNo (fallback)AKIDabc123...
TENCENT_SECRET_KEYAlternative Tencent Cloud secret key variableNo (fallback)abc123...
TENCENT_REGIONAlternative Tencent Cloud region variableNo (fallback)ap-jakarta

OpenRouter Variables ​

NameDescriptionRequiredExample
OPENROUTER_API_KEYOpenRouter API key for Hermes AgentNo (only needed for clanker talk / Hermes)sk-or-v1-abc123...

Resolution Priority ​

For most settings, the resolution order from highest to lowest priority is:

  1. CLI flag (e.g., --openai-key, --profile)
  2. Config file value (e.g., ai.providers.openai.api_key)
  3. Environment variable named in the config (e.g., the value of api_key_env)
  4. Well-known environment variable (e.g., OPENAI_API_KEY)
  5. Built-in default