Answer: Set the OPENCODE_CLI_CONFIG_CONTENT environment variable to apply CLI settings from inline JSON, for example OPENCODE_CLI_CONFIG_CONTENT='{"tabs":{"mode":"off"}}' opencode. OpenCode merges the inline settings over the global cli.json, with nested objects merged while arrays and scalar values from the environment replace global values. Status: Confirmed Entry: tool/opencode/settings/inline-cli-config Revision: 1 Digest: sha256:6dd54e0b07f07b4d (changes whenever the content changes) Timeline: Created: 2026-11-13T03:56:13Z Last changed: 2026-11-13T03:56:13Z Last verified: 2026-11-20T13:45:01Z Next check: 2026-11-21T13:45:01Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of environment variable | OPENCODE_CLI_CONFIG_CONTENT | [1] | 2026-11-20 example command | OPENCODE_CLI_CONFIG_CONTENT= '{"tabs":{"mode":"off"}}' opencode | [1] | 2026-11-20 merge behavior | merges the inline settings over the global cli.json | [1] | 2026-11-20 precedence | Inline settings remain authoritative while the variable is set. | [1] | 2026-11-20 Sources: [1] opencode. "Settings | OpenCode". https://opencode.ai/docs/cli/config/ Role: primary. Accessed: 2026-11-20T13:45:01Z Quote: "Set OPENCODE_CLI_CONFIG_CONTENT to apply CLI settings from inline JSON" (Supports: environment variable) Quote: "OPENCODE_CLI_CONFIG_CONTENT= '{"tabs":{"mode":"off"}}' opencode" (Supports: example command) Quote: "OpenCode merges the inline settings over the global cli.json ." (Supports: merge behavior) Quote: "Inline settings remain authoritative while the variable is set." (Supports: precedence) 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:13Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:45:01Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:45:01Z Last attempt: 2026-11-20T13:45:01Z Notes and limitations: Extracted automatically from a single official source (section "Inline config"). Related: https://latestn.com/tool/opencode/settings/jsonc-format-support Does opencode config support comments and trailing commas? https://latestn.com/tool/opencode/settings/local-directory-reference How do I use a local directory as a reference in opencode? https://latestn.com/tool/opencode/settings/migrate-plugin-configuration How do I migrate an opencode plugin's configuration from V1 to V2? https://latestn.com/tool/opencode/settings/experimental-features How do I enable experimental features like background compaction or image generation in opencode? https://latestn.com/tool/opencode/settings/global-mcp-server How do I make an MCP server available in every opencode project? https://latestn.com/tool/opencode/settings/harness-base-urls What base URLs do I use to point a harness at the opencode Console gateway? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:56:13Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/opencode/settings/inline-cli-config/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/inline-cli-config POST: https://latestn.com/dispute/tool/opencode/settings/inline-cli-config with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/opencode/settings/inline-cli-config?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I apply opencode CLI settings from inline JSON? Revision 1, last verified 2026-11-20T13:45:01Z. https://latestn.com/tool/opencode/settings/inline-cli-config (accessed 2026-11-21T09:50:23Z). @misc{LatestN_tool_opencode_settings_inline_cli_config_r1, title = {How do I apply opencode CLI settings from inline JSON?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/opencode/settings/inline-cli-config}}, note = {Revision 1; digest sha256:6dd54e0b07f07b4d; last verified 2026-11-20T13:45:01Z; accessed 2026-11-21T09:50:23Z} } 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/inline-cli-config