MyNixOS website logo

CLI-specific configuration written to $XDG_CONFIG_HOME/opencode/cli.json.

This includes theme, tabs, diffs, sessions, keybinds, and other terminal-client settings. See https://opencode.ai/v2/docs/cli/config for the documentation.

Note that "$schema": "https://opencode.ai/v2/cli.json" is automatically added.

OpenCode 2 reads this file and rewrites it when settings are changed from the TUI. If OpenCode has already created cli.json, back up or move the app-owned file before enabling this option, or enable programs.opencode.mutableSettings to keep declarative settings in a separate layer.

OpenCode 1 reads tui.json instead; use programs.opencode.tui for OpenCode 1.

Declarations
Type
JSON value
Default
{ }
Example
{
  tabs = {
    mode = "auto";
  };
  theme = {
    mode = "system";
    name = "system";
  };
}