Skip to content

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 changeFilePage
Colors and custom themestui.jsonThemes
Keyboard shortcutstui.jsonKeybinds
Model, provider, credentialsopencode.jsonModels, Providers
Agents and promptsopencode.jsonAgents
Tool permissionsopencode.jsonPermissions
Auto-formatting on saveopencode.jsonFormatters
Language serversopencode.jsonLSP
MCP serversopencode.jsonMCP servers
Project rulesAGENTS.mdRules