Skip to main content

config.toml Reference

Complete reference for ~/.opscode/config.toml — model defaults, display settings, tool permissions, and interpreter configuration.

OpsCode reads its main configuration from ~/.opscode/config.toml. Use /config in an interactive session to view and modify settings, or opscode config show from the shell. See Configuration for how settings resolve across environment variables, config.toml, and defaults.


File location

~/.opscode/config.toml

Create this file manually or let OpsCode create it automatically when you first change a setting via /config or /model.


Models

[model]
default = "anthropic:claude-opus-4-7" # Default model (provider:model-name format)
reasoning_effort = "medium" # low, medium, or high
KeyTypeDefaultDescription
defaultstring(none)Default model specifier in provider:model-name format
reasoning_effortchoice"medium"Reasoning effort level for supported models: low, medium, high

Set the default model from the CLI:

opscode --default-model anthropic:claude-opus-4-7

Or use /model inside an interactive session to switch models on the fly.


Providers

Configure provider-specific settings and endpoints:

[providers.openai]
enabled = true
base_url = "https://api.openai.com/v1"
models = ["gpt-4.1", "gpt-4.1-mini", "o3-mini"]

[providers.anthropic]
enabled = true

[providers.ollama]
enabled = true
base_url = "http://localhost:11434"
models = ["llama3.3", "qwen2.5-coder"]
KeyTypeDescription
enabledboolWhether this provider is active
modelslist[string]Model identifiers available from this provider
base_urlstringOverride the default API endpoint
base_url_envstringEnv var name for the base URL override
api_key_envstringEnv var name for the API key
class_pathstringCustom LangChain model class path
paramstableExtra kwargs passed to the model constructor
display_namestringHuman-readable provider name

Endpoints, keys, and gateways

If you use an API gateway, proxy, or private VPC endpoint, configure base_url:

[providers.openai]
base_url = "https://my-gateway.corp.internal/openai/v1"

Or use /auth inside a session to configure keys and base URLs interactively.


Display / UI

[ui]
theme = "dark" # Color theme
show_scrollbar = false # Vertical scrollbar in chat area
show_timestamps = true # Timestamps on messages
auto_scroll = true # Auto-scroll to newest messages
notifications = true # Desktop notifications
show_turn_duration = true # Agent turn execution duration
verbose = false # Verbose debug output
auto_compact = false # Auto-compact conversation history
KeyTypeDefaultEnv VarDescription
themestring"dark"OPSCODE_THEMEActive color theme
show_scrollbarboolfalseShow vertical scrollbar in chat pane
show_timestampsbooltrueShow timestamps on messages
auto_scrollbooltrueAuto-scroll to newest streaming tokens
notificationsbooltrueEnable desktop notifications
show_turn_durationbooltrueShow agent turn duration timer
verboseboolfalseOPSCODE_VERBOSEEnable verbose debugging mode
auto_compactboolfalseAutomatically compact conversation history

Tools

[tools]
shell_allow_list = ["terraform", "tofu", "kubectl", "helm", "ansible-playbook"]
KeyTypeEnv VarDescription
shell_allow_listlist[string]SHELL_ALLOW_LISTShell commands allowed without approval

Shell allow list values

The --shell-allow-list CLI flag (or shell_allow_list config) accepts:

  • "recommended" — Curated set of safe, read-only commands (ls, cat, grep, kubectl get, terraform validate, etc.)
  • "all" — Allow all shell commands without approval prompt
  • Comma-separated list — Specific command binaries (e.g., "terraform,tofu,kubectl,helm")

Interpreter

[interpreter]
enable_interpreter = false
ptc = "safe"
ptc_acknowledge_unsafe = false
KeyTypeDefaultDescription
enable_interpreterboolfalseEnable QuickJS JavaScript code interpreter (js_eval)
ptcstring(none)Programmatic Tool Calling (PTC) mode: "safe", "all", or comma-separated tools
ptc_acknowledge_unsafeboolfalseExplicitly acknowledge unsafe PTC exposure

Permissions

Default permission settings for tool operations:

[permissions]
shell_read = true # Allow non-mutating shell commands
shell_write = false # Allow mutating shell commands
file_read = true # Allow file read operations
file_write = false # Allow file write / edit operations
infra_plan = false # Allow infrastructure plan operations (terraform plan, etc.)
infra_apply = false # Allow infrastructure apply operations (terraform apply, etc.)
KeyTypeDefaultDescription
shell_readbooltrueNon-mutating shell commands (e.g., kubectl get, cat)
shell_writeboolfalseMutating shell commands (e.g., kubectl apply, rm)
file_readbooltrueFile read operations (read_file, grep, glob, ls)
file_writeboolfalseFile write/edit/delete operations
infra_planboolfalseInfrastructure dry-run operations (e.g., terraform plan)
infra_applyboolfalseInfrastructure mutating operations (e.g., terraform apply)
tip

Use /permissions inside an interactive session to inspect and toggle these permissions dynamically.


Startup

[startup]
yolo_switcher = false # Allow YOLO mode switching via Shift+Tab

Warnings

Suppress recurring informational banners:

[warnings]
suppress = ["yolo"] # Suppress "YOLO is active" toast

Complete example

[model]
default = "anthropic:claude-opus-4-7"
reasoning_effort = "high"

[providers.openai]
enabled = true

[providers.anthropic]
enabled = true

[providers.ollama]
enabled = true
base_url = "http://localhost:11434"
models = ["llama3.3", "qwen2.5-coder"]

[ui]
theme = "dark"
show_timestamps = true
auto_compact = false

[interpreter]
enable_interpreter = false

[tools]
shell_allow_list = ["tofu", "terraform", "kubectl", "helm"]

[permissions]
shell_read = true
shell_write = false
file_read = true
file_write = false
infra_plan = false
infra_apply = false