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"
| Key | Type | Default | Description |
|---|---|---|---|
default | string | (none) | Default model specifier in provider:model-name format |
reasoning_effort | string | "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"]
| Key | Type | Description |
|---|---|---|
enabled | bool | Whether the provider is enabled in the /model selector |
models | list[string] | Model identifiers exposed by this provider |
base_url | string | Custom API endpoint, internal proxy, or VPC gateway URL |
base_url_env | string | Environment variable name holding the base URL override |
api_key_env | string | Environment variable name holding the API key |
class_path | string | Custom LangChain chat model class path |
params | table | Additional keyword arguments passed to the model constructor |
display_name | string | Human-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
| Key | Type | Default | Environment variable | Description |
|---|---|---|---|---|
theme | string | "dark" | OPSCODE_THEME | Active TUI color theme |
show_scrollbar | bool | false | — | Display vertical scrollbar in the chat pane |
show_timestamps | bool | true | — | Display message timestamps |
auto_scroll | bool | true | — | Automatically scroll as new tokens stream |
notifications | bool | true | — | Emit desktop notifications when long turns complete |
show_turn_duration | bool | true | — | Show execution duration after each turn |
verbose | bool | false | OPSCODE_VERBOSE | Show verbose tool and debug output |
auto_compact | bool | false | — | 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"]
| Key | Type | Environment variable | Description |
|---|---|---|---|
shell_allow_list | list[string] | SHELL_ALLOW_LIST | Binaries 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
| Key | Type | Default | Description |
|---|---|---|---|
shell_read | bool | true | Non-mutating shell commands (kubectl get, cat, git diff) |
shell_write | bool | false | Mutating shell commands (kubectl apply, rm) |
file_read | bool | true | Workspace file reads (read_file, grep, glob, ls) |
file_write | bool | false | File creation, edits, and deletions |
infra_plan | bool | false | Infrastructure dry-run plans (terraform plan, tofu plan) |
infra_apply | bool | false | Infrastructure 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
| Key | Type | Default | Description |
|---|---|---|---|
enable_interpreter | bool | false | Enable the QuickJS code interpreter middleware |
ptc | string | (none) | Programmatic Tool Calling scope: "safe", "all", or comma-separated tool names |
ptc_acknowledge_unsafe | bool | false | Acknowledge unsafe tool exposure when ptc = "all" |
[startup] and [warnings]
[startup]
mode = "manual"
yolo_switcher = false
[warnings]
suppress = ["yolo"]
| Section & Key | Type | Default | Description |
|---|---|---|---|
[startup].mode | string | "manual" | Default approval mode at startup ("manual" or "auto") |
[startup].yolo_switcher | bool | false | Allow cycling into YOLO mode with Shift+Tab |
[warnings].suppress | list[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