Personalization
Customize OpenCode to match your preferences and workflow. The settings below are grouped by the file that owns them.
Interface settings → tui.json
The terminal interface has its own config file. Create ~/.config/opencode/tui.json (or tui.jsonc) and set the keys you want.
Theme
{
"$schema": "https://opencode.ai/tui.json",
"theme": "tokyonight"
}
Built-in themes include system, tokyonight, everforest, ayu, catppuccin, catppuccin-macchiato, gruvbox, kanagawa, nord, matrix, and one-dark. Custom themes are JSON files — see Themes.
Keybinds
{
"$schema": "https://opencode.ai/tui.json",
"keybinds": {
"leader": "ctrl+x",
"command_list": "ctrl+p",
"theme_list": "<leader>t"
}
}
Disable a binding with "none". See Keybinds for the full list.
Attention, cursor, and scrolling
{
"$schema": "https://opencode.ai/tui.json",
"attention": {
"enabled": true,
"notifications": true,
"sound": true,
"volume": 0.4
},
"cursor": {
"style": "blink",
"blink": true
},
"scroll_speed": 3
}
Agent and runtime settings → opencode.json
Default model and agent
{
"$schema": "https://opencode.ai/config.json",
"model": "anthropic/claude-sonnet-5-5",
"small_model": "anthropic/claude-haiku-5-5",
"default_agent": "build"
}
Custom agents
{
"$schema": "https://opencode.ai/config.json",
"agent": {
"reviewer": {
"description": "Reviews code for correctness",
"model": "anthropic/claude-sonnet-5-5",
"prompt": "You are a code reviewer.",
"tools": { "write": false, "edit": false }
}
}
}
Permissions
{
"$schema": "https://opencode.ai/config.json",
"permission": {
"edit": "ask",
"bash": "ask",
"webfetch": "allow"
}
}
Formatters and LSP servers
{
"$schema": "https://opencode.ai/config.json",
"formatter": true,
"lsp": true
}
Instructions, references, and watchers
{
"$schema": "https://opencode.ai/config.json",
"instructions": ["CONTRIBUTING.md", ".cursor/rules/*.md"],
"watcher": {
"ignore": ["**/generated/**"]
}
}
ignore belongs under watcher — it is not a top-level key.
Where to go next
| You want to change | File | Page |
|---|---|---|
| Colors and custom themes | tui.json | Themes |
| Keyboard shortcuts | tui.json | Keybinds |
| Model, provider, credentials | opencode.json | Models, Providers |
| Agents and prompts | opencode.json | Agents |
| Tool permissions | opencode.json | Permissions |
| Auto-formatting on save | opencode.json | Formatters |
| Language servers | opencode.json | LSP |
| MCP servers | opencode.json | MCP servers |
| Project rules | AGENTS.md | Rules |