Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Environment Variables

Caliban reads environment variables in two groups: CALIBAN_* variables that control the harness itself, and per-provider API-key and endpoint variables. Most CALIBAN_* flags mirror a corresponding CLI flag; the CLI flag always wins when both are set.


Provider API Keys

VariableProviderPurpose
ANTHROPIC_API_KEYAnthropicRequired. API key for the Anthropic provider.
ANTHROPIC_BASE_URLAnthropicOptional. Override the Anthropic API base URL (useful for proxies or Bedrock-compatible endpoints).
OPENAI_API_KEYOpenAIRequired when using OpenAI.
OPENAI_BASE_URLOpenAIOptional. Override the OpenAI API base URL (for LM Studio, Mistral, and other OpenAI-compatible endpoints).
OPENAI_ORG_IDOpenAIOptional. OpenAI organization ID.
OPENAI_PROJECTOpenAIOptional. OpenAI project ID.
AZURE_OPENAI_API_KEYAzure OpenAIRequired when using Azure OpenAI.
AZURE_OPENAI_RESOURCEAzure OpenAIRequired when using Azure OpenAI. Azure resource name.
AZURE_OPENAI_API_VERSIONAzure OpenAIOptional. API version string. Default: 2024-10-21.
GEMINI_API_KEYGoogleRequired when using the Google provider. GOOGLE_GEMINI_API_KEY is checked as a fallback.
GOOGLE_GEMINI_API_KEYGoogleFallback for GEMINI_API_KEY.
OLLAMA_BASE_URLOllamaOptional. Base URL for the Ollama server. Default: http://localhost:11434.

Headless & Print Mode

VariableDefaultDescription
CALIBAN_MAX_ATTACH_BYTES262144 (256 KB)Maximum size of a single @-attachment. Also settable via --max-attach-bytes.
CALIBAN_ATTACH_BUDGET_BYTES1048576 (1 MB)Aggregate size cap across all @-attachments in one message. Also settable via --attach-budget-bytes.

Permissions & Security

VariableDefaultDescription
CALIBAN_DEFAULT_PERMISSION_MODEdefaultInitial permission mode. Values: default, acceptEdits, plan, auto, dontAsk, bypassPermissions. CLI --permission-mode wins when set.
CALIBAN_NO_PERMISSIONSAny non-empty value disables permission gating (all tool calls allowed). Conflicts with --allow, --deny, --ask, --auto-allow.
CALIBAN_AUTO_ALLOWDangerous. Any non-empty value allows Ask-rule tools without prompting in non-interactive mode.
CALIBAN_DISABLE_AUTO_MODEAny non-empty value disables the auto-mode classifier; all calls fall through to Ask.

Caching & Performance

VariableDefaultDescription
CALIBAN_NO_PROMPT_CACHEAny non-empty value disables Anthropic-style prompt caching.
CALIBAN_NO_PARALLEL_TOOLSAny non-empty value forces serial tool execution.
CALIBAN_PARALLEL_TOOL_LIMITCPU cores − 1 (min 1)Maximum concurrent tool invocations per turn.

Hooks, Skills, MCP & Plugins

VariableDefaultDescription
CALIBAN_NO_HOOKSAny non-empty value bypasses every external hook handler. In-process hooks still run.
CALIBAN_NO_SKILLSAny non-empty value disables skill discovery at startup.
CALIBAN_NO_MCPAny non-empty value disables MCP server discovery.
CALIBAN_MCP_OAUTH_PORT0 (ephemeral)Loopback port for the MCP OAuth callback server (ADR 0023 Phase C).
CALIBAN_MCP_TIMEOUTTimeout (ms) for MCP server startup/connection.
CALIBAN_MCP_TOOL_TIMEOUTPer-tool-call timeout (ms) for MCP tools.
CALIBAN_NO_PLUGINSAny non-empty value disables plugin discovery.
CALIBAN_ENABLED_PLUGINSComma-separated list of plugin names to enable (all others disabled).
CALIBAN_PLUGIN_ROOTOverride the plugin install root directory.

Sub-agents

VariableDefaultDescription
CALIBAN_NO_SUB_AGENTAny non-empty value disables the built-in AgentTool.
CALIBAN_DAEMON_RUNTIME_DIRPlatform defaultOverride the runtime socket directory for the supervisor daemon.

Memory

VariableDefaultDescription
CALIBAN_DISABLE_AUTO_MEMORYAny non-empty value disables auto-memory topic-file writing.
CALIBAN_MEMORY_DIRPlatform defaultOverride the auto-memory topic files directory.
CALIBAN_MEMORY_BUDGET_TOKENSTotal token budget across all memory tiers.
CALIBAN_MEMORY_CAP_TOKENS_AUTOToken budget cap for the auto-memory tier.
CALIBAN_MEMORY_CAP_TOKENS_CLAUDE_MDToken budget cap for the CLAUDE.md tier.
CALIBAN_AUTO_MEMORY_DIRECTORYOverride the auto-memory directory (alias form).
CALIBAN_DISABLE_CLAUDE_MD_WALKAny non-empty value disables the CLAUDE.md walk-up discovery.
CALIBAN_ADDITIONAL_DIRECTORIES_CLAUDE_MDColon-separated list of extra directories to search for CLAUDE.md.
CALIBAN_CLAUDE_MD_EXCLUDESColon-separated glob patterns to exclude from CLAUDE.md discovery.
CALIBAN_APPROVE_IMPORTSAny non-empty value auto-approves CLAUDE.md @import statements.

Checkpoints

VariableDefaultDescription
CALIBAN_CHECKPOINT_ROOT~/.caliban/projectsOverride the checkpoint root directory.
CALIBAN_CHECKPOINT_DISABLEDAny non-empty value disables checkpoint recording and pruning.
CALIBAN_CHECKPOINT_MAX_FILE_BYTESMaximum checkpoint file size before rotation.
CALIBAN_CLEANUP_PERIOD_DAYSNumber of days after which old checkpoint files are pruned.

Configuration & Router

VariableDefaultDescription
CALIBAN_ROUTER_CONFIGWalk-up discoveryExplicit path to caliban.toml. Also settable via --config.
CALIBAN_STRICT_ROUTINGAny non-empty value enables strict routing (no fallback to default route on unknown purpose).
CALIBAN_API_KEY_HELPER_TTL_MSTTL in milliseconds for API key helper subprocess cache.

Output

VariableDefaultDescription
CALIBAN_OUTPUT_STYLEName of the active output style (see Output Styles).
CALIBAN_GRAPHICSGraphics capability hint (e.g. kitty, sixel).

Observability & Telemetry

VariableDefaultDescription
CALIBAN_ENABLE_TELEMETRYAny non-empty value enables OTel telemetry (settings enable_telemetry is also checked).
CALIBAN_OTEL_HEADERS_HELPERCommand to supply dynamic OTel export headers.
OTEL_EXPORTER_OTLP_ENDPOINTOTel OTLP exporter endpoint URL.
OTEL_EXPORTER_OTLP_PROTOCOLgrpcOTel OTLP transport protocol.
OTEL_EXPORTER_OTLP_HEADERSAdditional headers for the OTLP exporter.
OTEL_METRIC_EXPORT_INTERVAL60sOTel metric export interval.
OTEL_LOGS_EXPORTERotlpOTel logs exporter type.
OTEL_METRICS_EXPORTERotlpOTel metrics exporter type.
OTEL_TRACES_EXPORTERotlpOTel traces exporter type.
CALIBAN_RATES_YAMLPath to a YAML file overriding the built-in provider pricing rate card.

Debug

VariableDefaultDescription
CALIBAN_DEBUGAny non-empty value enables the file-backed tracing subscriber (appends to the platform debug log). Also settable via --debug.

Plugin Trust & Marketplace

VariableDefaultDescription
CALIBAN_BLOCKED_MARKETPLACESComma-separated list of marketplace names to block.
CALIBAN_STRICT_KNOWN_MARKETPLACESAny non-empty value blocks installs from unrecognized marketplaces.
CALIBAN_STRICT_PLUGIN_ONLY_CUSTOMIZATIONAny non-empty value restricts customization to plugins only (no user-level skills/hooks).

Provider precedence

When CALIBAN_PROVIDER is set, it overrides the --provider flag and settings-derived provider. This is the escape hatch for scripting scenarios where injecting a flag is inconvenient.