Answer: Add the published JSON Schema to cli.json by including the "$schema" key set to "https://opencode.ai/v2/cli.json". OpenCode also adds $schema when it creates or migrates this file, and you should keep $schema so your editor flags invalid values. Status: Confirmed Entry: tool/opencode/settings/cli-json-schema Revision: 1 Digest: sha256:a701babfbc9d96c1 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:56:14Z Last changed: 2026-11-13T03:56:14Z Last verified: 2026-11-20T13:45:04Z Next check: 2026-11-21T13:45:04Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of schema URL | https://opencode.ai/v2/cli.json | [1] | 2026-11-20 config file path | ~/.config/opencode/cli.json | [1] | 2026-11-20 XDG config path | $XDG_CONFIG_HOME/opencode/cli.json | [1] | 2026-11-20 Sources: [1] opencode. "Settings | OpenCode". https://opencode.ai/docs/cli/config/ Role: primary. Accessed: 2026-11-20T13:45:04Z Quote: "{ "$schema" : "https://opencode.ai/v2/cli.json" }" (Supports: schema URL) Quote: "~/.config/opencode/cli.json" (Supports: config file path) Quote: "$XDG_CONFIG_HOME/opencode/cli.json" (Supports: XDG config path) Snapshot SHA-256: 8bd0d1bd2cd194bfea370982c31f597ac50f27460383bd8166f6c3d9117eeafa (captured 2026-11-13T03:56:12Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T03:56:14Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:45:04Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:45:04Z Last attempt: 2026-11-20T13:45:04Z Notes and limitations: Extracted automatically from a single official source (section "Configuration file"). Related: https://latestn.com/tool/opencode/settings/cli-settings-file-location Where does opencode store its CLI settings file? https://latestn.com/tool/opencode/settings/cloudflare-customize-config How do I customize the opencode Cloudflare SDK configuration? https://latestn.com/tool/opencode/settings/command-file-locations Where do global and project opencode commands live? https://latestn.com/tool/opencode/settings/add-plugin-to-config How do I add a plugin to opencode in opencode.jsonc? https://latestn.com/tool/opencode/settings/change-settings-in-tui How do I change opencode CLI settings from the TUI? https://latestn.com/tool/opencode/settings/change-theme How do I change the theme in opencode? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:56:14Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/opencode/settings/cli-json-schema/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/opencode/settings/cli-json-schema POST: https://latestn.com/dispute/tool/opencode/settings/cli-json-schema with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/opencode/settings/cli-json-schema?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I add the JSON schema to opencode's cli.json for validation? Revision 1, last verified 2026-11-20T13:45:04Z. https://latestn.com/tool/opencode/settings/cli-json-schema (accessed 2026-11-21T09:50:29Z). @misc{LatestN_tool_opencode_settings_cli_json_schema_r1, title = {How do I add the JSON schema to opencode's cli.json for validation?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/opencode/settings/cli-json-schema}}, note = {Revision 1; digest sha256:a701babfbc9d96c1; last verified 2026-11-20T13:45:04Z; accessed 2026-11-21T09:50:29Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/opencode/settings/cli-json-schema