Skip to main content

config.toml reference

OpsCode reads its primary user configuration from ~/.opscode/config.toml. You can edit this file directly, modify settings interactively with /config, or inspect resolved values from the shell with opscode config show.

[model]​

Configure the default model and reasoning budget:

[model]
default = "anthropic:claude-opus-4-7"
reasoning_effort = "medium"
KeyTypeDefaultDescription
defaultstring(none)Default model specifier in provider:model-name format
reasoning_effortstring"medium"Reasoning budget for thinking models ("low", "medium", "high")

[providers.<name>]​

Configure provider endpoints, custom gateways, and model lists:

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

[providers.ollama]
enabled = true
base_url = "http://localhost:11434"
models = ["qwen2.5-coder:32b", "llama3.3"]
KeyTypeDescription
enabledboolWhether the provider is enabled in the /model selector
modelslist[string]Model identifiers exposed by this provider
base_urlstringCustom API endpoint, internal proxy, or VPC gateway URL
base_url_envstringEnvironment variable name holding the base URL override
api_key_envstringEnvironment variable name holding the API key
class_pathstringCustom LangChain chat model class path
paramstableAdditional keyword arguments passed to the model constructor
display_namestringHuman-readable name displayed in the TUI

[ui]​

Customize the interactive terminal user interface:

[ui]
theme = "dark"
show_scrollbar = false
show_timestamps = true
auto_scroll = true
notifications = true
show_turn_duration = true
verbose = false
auto_compact = false
KeyTypeDefaultEnvironment variableDescription
themestring"dark"OPSCODE_THEMEActive TUI color theme
show_scrollbarboolfalse—Display vertical scrollbar in the chat pane
show_timestampsbooltrue—Display message timestamps
auto_scrollbooltrue—Automatically scroll as new tokens stream
notificationsbooltrue—Emit desktop notifications when long turns complete
show_turn_durationbooltrue—Show execution duration after each turn
verboseboolfalseOPSCODE_VERBOSEShow verbose tool and debug output
auto_compactboolfalse—Automatically compact history when nearing context limits

[tools]​

Pre-approve shell binaries that can run without interactive confirmation:

[tools]
shell_allow_list = ["terraform", "tofu", "kubectl", "helm", "ansible-playbook"]
KeyTypeEnvironment variableDescription
shell_allow_listlist[string]SHELL_ALLOW_LISTBinaries or presets ("recommended", "all") allowed without prompting

[permissions]​

Control fine-grained tool execution boundaries:

[permissions]
shell_read = true
shell_write = false
file_read = true
file_write = false
infra_plan = false
infra_apply = false
KeyTypeDefaultDescription
shell_readbooltrueNon-mutating shell commands (kubectl get, cat, git diff)
shell_writeboolfalseMutating shell commands (kubectl apply, rm)
file_readbooltrueWorkspace file reads (read_file, grep, glob, ls)
file_writeboolfalseFile creation, edits, and deletions
infra_planboolfalseInfrastructure dry-run plans (terraform plan, tofu plan)
infra_applyboolfalseInfrastructure mutations (terraform apply, tofu apply)

[interpreter]​

Configure the embedded QuickJS JavaScript interpreter (js_eval) and Programmatic Tool Calling (PTC):

[interpreter]
enable_interpreter = false
ptc = "safe"
ptc_acknowledge_unsafe = false
KeyTypeDefaultDescription
enable_interpreterboolfalseEnable the QuickJS code interpreter middleware
ptcstring(none)Programmatic Tool Calling scope: "safe", "all", or comma-separated tool names
ptc_acknowledge_unsafeboolfalseAcknowledge unsafe tool exposure when ptc = "all"

[startup] and [warnings]​

[startup]
mode = "manual"
yolo_switcher = false

[warnings]
suppress = ["yolo"]
Section & KeyTypeDefaultDescription
[startup].modestring"manual"Default approval mode at startup ("manual" or "auto")
[startup].yolo_switcherboolfalseAllow cycling into YOLO mode with Shift+Tab
[warnings].suppresslist[string][]Recurring informational banners to hide (e.g., ["yolo"])

Complete example​

~/.opscode/config.toml
[model]
default = "anthropic:claude-opus-4-7"
reasoning_effort = "high"

[providers.anthropic]
enabled = true

[providers.openai]
enabled = true

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

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

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

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