Environment variables override config file values. Provider API keys should be set via env vars (not stored in config files).
This reference is curated rather than exhaustive. It focuses on
high-traffic and operator-relevant variables, including patterned families
below.
Use environment variables for credentials, CI overrides, and temporary local
changes. Prefer TOML for durable project behavior. When both exist, confirm the
effective value from the TUI, CLI diagnostics, or the provider-specific error
message before changing more than one layer.
| Variable | Description |
|---|
BMO_SSE_HEARTBEAT_INTERVAL_SECONDS | Integer override for options.sse_heartbeat_interval_seconds (see internal/config/defaults_helpers.go + config schema) |
BMO_MCP_EXTRA_HEADERS | JSON object of extra HTTP headers merged into every HTTP/SSE MCP client and HTTP extension (same merge as applyMCPHeadersFromEnv in internal/config/load.go) |
BMO_MCP_HEADERS_<ID> | Per-server header JSON; <ID> is the config key with - and . replaced by _, uppercased (e.g. my-server → BMO_MCP_HEADERS_MY_SERVER) |
BMO_MCP_BEARER_TOKEN_<ID> | Per-server Authorization: Bearer … override using the same <ID> normalization as BMO_MCP_HEADERS_* |
See MCP server for when headers apply and approval semantics.
| Variable | Description |
|---|
BMO_LOG_STDERR | When set to a true boolean, mirror log output to stderr in addition to the log rotator (internal/log/log.go) |
| Variable | Provider |
|---|
ANTHROPIC_API_KEY | Anthropic Claude |
BMO_ANTHROPIC_API_KEY | Anthropic Claude (BMO-specific override) |
OPENAI_API_KEY | OpenAI |
BMO_OPENAI_API_KEY | OpenAI (BMO-specific override) |
OPENROUTER_API_KEY | OpenRouter (non-BMO name; same logical key) |
BMO_OPENROUTER_API_KEY | OpenRouter (BMO-prefixed override, wins over OPENROUTER_API_KEY when both are set) |
BMO_ZAI_API_KEY | ZAI provider |
XIAOMI_API_KEY | Xiaomi MiMo providers (type = "xiaomi" or Xiaomi-compatible base URLs) |
For Bedrock, Vertex, and Azure — configure credentials via the standard
provider-specific mechanisms (AWS credentials, GCP ADC, Azure CLI). Bedrock
also honors BMO-prefixed AWS overrides such as BMO_AWS_ACCESS_KEY_ID,
BMO_AWS_SECRET_ACCESS_KEY, BMO_AWS_REGION, BMO_AWS_PROFILE, and
BMO_AWS_BEARER_TOKEN_BEDROCK. For Bedrock bearer-token access that should
survive across shells without plaintext config, store the token as the provider
key with bmo auth bedrock token <provider> --token-stdin; BMO writes a
keychain:<provider> sentinel when durable credential storage is available.
| Variable | Description |
|---|
BMO_GLOBAL_CONFIG | Override the global config directory; BMO reads bmo.toml (or an existing bmo.json) inside it |
BMO_GLOBAL_DATA | Override path to global data directory |
BMO_AGENT_BACKEND | Runtime backend: native by default; agent_sdk_go only in binaries built with -tags=agent_sdk_go. Legacy adk_go input is rejected as unsupported. |
BMO_SANDBOX_MODE | File write mode: direct or staged |
BMO_SKILLS_DIR | Override skills directory path |
BMO_SHOW_LOGO | Show/hide BMO logo at startup (true/false) |
BMO_DISABLE_DEFAULT_PROVIDERS | Ignore all built-in provider defaults |
BMO_DISABLE_PROVIDER_AUTO_UPDATE | Disable automatic provider config updates |
BMO_CORE_UTILS | Enable core utility tools override |
| Variable | Description |
|---|
BMO_ENABLE_METRICS | Opt into pseudonymous usage metrics |
BMO_DISABLE_METRICS | Force-disable metrics (overrides enable_metrics) |
DO_NOT_TRACK | Standard opt-out signal (also disables metrics) |
| Variable | Description |
|---|
BMO_OTEL_ENABLED | Enable OpenTelemetry tracing |
BMO_OTEL_ENDPOINT | OTLP HTTP endpoint (e.g. localhost:4318 or http://localhost:4318/v1/traces) |
BMO_LANGFUSE_ENABLED | Enable Langfuse tracing |
BMO_LANGFUSE_HOST | Langfuse host URL |
BMO_LANGFUSE_PUBLIC_KEY | Langfuse public key |
BMO_LANGFUSE_SECRET_KEY | Langfuse secret key |
| Variable | Description |
|---|
BMO_STAGED_WORKFLOW_ENABLED | Enable staged plan→execute workflow |
BMO_REQUIRE_APPROVAL_BEFORE_EXECUTE | Require /approve before execution phase |
BMO_REQUIRE_VALIDATION_BEFORE_ACCEPT | Require validation before accepting changes |
BMO_VALIDATION_COMMAND | Command to run as validation step |
BMO_VALIDATION_TIMEOUT_SECONDS | Timeout for validation command |
BMO_AUTO_DEBUG | Enable auto-debug loop |
BMO_CHANGE_CONTRACT_ENABLED | Enable change-contract capture for file-mutating runs |
BMO_PROMPT_ENHANCER | Enable prompt enhancer |
BMO_WORKTREE_ISOLATION | Enable sub-agent worktree isolation |
BMO_ENABLE_PROCESS_LIFECYCLE_TOOLS | Register process lifecycle tools for agent sessions (see Tools) |
| Variable | Description |
|---|
BMO_PRUNING_ENABLED | Enable dynamic context pruning |
BMO_PRUNING_TYPE_INJECT_FOR_READ | Type-inject strategy for read-heavy pruning |
BMO_PRUNING_SUPERSEDE_WRITES | Remove superseded write tool calls |
BMO_PRUNING_DEDUP_BY_SIGNATURE | Deduplicate messages by content signature |
BMO_PRUNING_PURGE_ERRORS | Purge error messages during pruning |
BMO_PRUNING_PURGE_ERRORS_TURNS | Number of turns after which errors are pruned |
BMO_PRUNING_TURN_PROTECTION_TURNS | Recent turns to protect from pruning |
| Variable | Description |
|---|
BMO_MEMORY_USER_NAMESPACE | Fallback namespace for user-level persistent memory entries when no authenticated principal is available |
| Variable | Description |
|---|
BMO_OPENAI_COMPAT_ENABLED | Enable OpenAI-compatible API endpoint. Canonical config: options.openai_compat (legacy [experimental].openai_compat is normalized into options). |
BMO_OPENAI_COMPAT_TOOL_POLICY | Tool policy for OpenAI-compat mode |
BMO_OPENAI_COMPAT_MODEL_OVERRIDE_POLICY | Control whether OpenAI-compat requests may override the configured model |
BMO_OPENAI_COMPAT_REQUEST_TIMEOUT_SECONDS | Request timeout for the OpenAI-compat HTTP handler |
BMO_OPENAI_COMPAT_HEARTBEAT_INTERVAL_SECONDS | Heartbeat cadence for long-running OpenAI-compat streaming responses |
BMO_OPENAI_COMPAT_IDLE_TIMEOUT_SECONDS | Idle timeout for long-running OpenAI-compat requests |
BMO_PTY_OBSERVER_ENABLED | Enable PTY observer API. Canonical config: options.pty_observer (legacy [experimental].pty_observer is normalized into options). |
BMO_PTY_OBSERVER_ALLOW_REMOTE_SPAWN | Allow PTY observer remote clients to request spawn operations instead of read-only observation |
BMO_TEAMS_SERVER_URL | Remote teams API base URL |
BMO_TEAMS_TOKEN | Auth token for remote teams API |
BMO_DISABLE_ANTHROPIC_CACHE | When true, BMO does not attach Anthropic ephemeral cache_control to the last tool. See Prompt caching for behavior, tradeoffs, and provider notes. |
| Variable | Description |
|---|
BMO_TUI_SLASH_OPENS_COMMANDS | Whether / in empty input opens commands modal |
BMO_TUI_SHOW_LANDING_HINTS | Show or hide the initial landing guidance and numbered quick-start choices |
| Variable | Description |
|---|
BMO_PROFILE | Enable pprof HTTP endpoint at localhost:6060 |