We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

CLI Config

The opencode.jsonc file configures the OpenCode agent, but CLI- and TUI-specific preferences are stored in cli.json:

~/.config/opencode/cli.json

It controls things like:

  • Theme choices
  • Keybindings
  • Diff display
  • Scroll behavior

A basic cli.json might look like this:

{
  "theme": {
    "name": "tokyonight",
    "mode": "system"
  },
  "scroll": {
    "speed": 2,
    "acceleration": true
  },
  "diffs": {
    "view": "auto",
    "wrap": "word"
  }
}

You often won't interact with this file directly, but OpenCode automatically modifies it when you use commands like /settings.

Don't worry about committing this file. cli.json lives in your global config directory, outside any specific project.