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.
| Name | Description | Required | Example |
|---|---|---|---|
OPENAI_API_KEY | OpenAI API key | Required if using the openai provider | sk-proj-abc123... |
ANTHROPIC_API_KEY | Anthropic API key | Required if using the anthropic provider | sk-ant-api03-abc123... |
GEMINI_API_KEY | Google AI Studio (Gemini) API key | Required if using the gemini-api provider | AIzaSy... |
DEEPSEEK_API_KEY | DeepSeek API key | Required if using the deepseek provider | sk-abc123... |
COHERE_API_KEY | Cohere API key | Required if using the cohere provider | abc123... |
MINIMAX_API_KEY | MiniMax API key | Required if using the minimax provider | eyJ... |
CLANKER_CLOUD_AUTH_TOKEN | Clanker Cloud auth token | Required if using the clanker-cloud provider and configured through api_key_env | ck_... |
AWS Variables
| Name | Description | Required | Example |
|---|---|---|---|
AWS_PROFILE | AWS CLI profile to use for infrastructure queries | No (can be set in config or via --profile) | my-dev-profile |
AWS_REGION | AWS region override | No (falls back to profile config, then us-east-1) | us-west-2 |
AWS_DEFAULT_REGION | Fallback AWS region if AWS_REGION is not set | No | us-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.
| Name | Description | Required | Example |
|---|---|---|---|
CLANKER_BACKEND_API_KEY | API key for authenticating with the Clanker backend | No (or set via --api-key flag) | ck_live_abc123... |
CLANKER_BACKEND_ENV | Backend environment: testing, staging, or production | No (default: testing) | production |
CLANKER_BACKEND_URL | Custom backend URL; overrides the CLANKER_BACKEND_ENV selection | No | https://api.clanker.example.com |
DigitalOcean Variables
| Name | Description | Required | Example |
|---|---|---|---|
DO_API_TOKEN | DigitalOcean API token | Required if using DigitalOcean and not set in config | dop_v1_abc123... |
DIGITALOCEAN_ACCESS_TOKEN | Alternative DigitalOcean API token variable | No (fallback if DO_API_TOKEN is not set) | dop_v1_abc123... |
Hetzner Variables
| Name | Description | Required | Example |
|---|---|---|---|
HCLOUD_TOKEN | Hetzner Cloud API token | Required if using Hetzner and not set in config | abc123... |
GitHub Variables
| Name | Description | Required | Example |
|---|---|---|---|
GITHUB_TOKEN | GitHub personal access token | No (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
| Name | Description | Required | Example |
|---|---|---|---|
SENTRY_AUTH_TOKEN | Sentry User Auth Token | Required if using clanker sentry and not set in config | sntrys_... |
SENTRY_ORG | Sentry organization slug | Required if using clanker sentry and not set in config | my-org |
SENTRY_PROJECT | Default Sentry project slug | No | api |
SENTRY_HOST | Sentry host; defaults to sentry.io | No | sentry.io |
Linear Variables
| Name | Description | Required | Example |
|---|---|---|---|
LINEAR_API_KEY | Linear Personal API Key | Required if using clanker linear and not set in config | lin_api_... |
LINEAR_WORKSPACE_ID | Optional Linear workspace UUID | No | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
LINEAR_TEAM | Default team key | No | ENG |
Notion Variables
| Name | Description | Required | Example |
|---|---|---|---|
NOTION_API_KEY | Notion internal integration token | Required if using clanker notion and not set in config | ntn_... |
NOTION_DATABASE_ID | Default Notion database ID | No | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
Cloudflare Variables
| Name | Description | Required | Example |
|---|---|---|---|
CLOUDFLARE_API_TOKEN | Cloudflare API token | Required if using Cloudflare and not set in config | abc123... |
CF_API_TOKEN | Alternative Cloudflare API token variable | No (fallback) | abc123... |
CLOUDFLARE_ACCOUNT_ID | Cloudflare account ID | No (some operations work without it) | abc123def456... |
CF_ACCOUNT_ID | Alternative Cloudflare account ID variable | No (fallback) | abc123def456... |
GCP Variables
| Name | Description | Required | Example |
|---|---|---|---|
GCP_PROJECT | GCP project ID | No (can be set in config under infra.gcp.project_id) | my-project-123 |
GOOGLE_CLOUD_PROJECT | Alternative GCP project ID variable | No (fallback) | my-project-123 |
GCLOUD_PROJECT | Alternative GCP project ID variable | No (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
| Name | Description | Required | Example |
|---|---|---|---|
AZURE_SUBSCRIPTION_ID | Azure subscription ID | No (can be set in config or via --azure-subscription) | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
AZ_SUBSCRIPTION_ID | Alternative Azure subscription ID variable | No (fallback) | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
Vercel Variables
| Name | Description | Required | Example |
|---|---|---|---|
VERCEL_TOKEN | Vercel API token | Required if using Vercel and not set in config | ... |
VERCEL_API_TOKEN | Alternative Vercel token variable | No | ... |
VERCEL_TEAM_ID | Team ID for team-scoped accounts | No | team_... |
VERCEL_ORG_ID | Alternative team/org ID variable | No | team_... |
Fly.io Variables
| Name | Description | Required | Example |
|---|---|---|---|
FLY_API_TOKEN | Fly.io API token | Required if using Fly.io and not set in config | FlyV1 ... |
FLY_ACCESS_TOKEN | Alternative Fly.io token variable | No | FlyV1 ... |
FLY_ORG | Fly.io organization slug | No | personal |
FLY_ORG_SLUG | Alternative organization slug variable | No | my-org |
Railway Variables
| Name | Description | Required | Example |
|---|---|---|---|
RAILWAY_API_TOKEN | Railway account API token | Required if using Railway and not set in config | ... |
RAILWAY_WORKSPACE_ID | Railway workspace/team ID | No | ... |
RAILWAY_TOKEN is intentionally not used because it is often a project deploy token, not the account token needed for API inventory.
Verda Variables
| Name | Description | Required | Example |
|---|---|---|---|
VERDA_CLIENT_ID | Verda API client ID | Required if using Verda and not set in config | ... |
VERDA_CLIENT_SECRET | Verda API client secret | Required if using Verda and not set in config | ... |
VERDA_PROJECT_ID | Verda project ID | Required for project-scoped operations | ... |
Tencent Cloud Variables
| Name | Description | Required | Example |
|---|---|---|---|
TENCENTCLOUD_SECRET_ID | Tencent Cloud CAM secret ID | Required if using Tencent Cloud and not set in config | AKIDabc123... |
TENCENTCLOUD_SECRET_KEY | Tencent Cloud CAM secret key | Required if using Tencent Cloud and not set in config | abc123... |
TENCENTCLOUD_REGION | Default Tencent Cloud region | No (falls back to ap-singapore) | ap-singapore |
TENCENT_SECRET_ID | Alternative Tencent Cloud secret ID variable | No (fallback) | AKIDabc123... |
TENCENT_SECRET_KEY | Alternative Tencent Cloud secret key variable | No (fallback) | abc123... |
TENCENT_REGION | Alternative Tencent Cloud region variable | No (fallback) | ap-jakarta |
OpenRouter Variables
| Name | Description | Required | Example |
|---|---|---|---|
OPENROUTER_API_KEY | OpenRouter API key for Hermes Agent | No (only needed for clanker talk / Hermes) | sk-or-v1-abc123... |
Resolution Priority
For most settings, the resolution order from highest to lowest priority is:
- CLI flag (e.g.,
--openai-key,--profile) - Config file value (e.g.,
ai.providers.openai.api_key) - Environment variable named in the config (e.g., the value of
api_key_env) - Well-known environment variable (e.g.,
OPENAI_API_KEY) - Built-in default