Repository navigation
Open OpenCode 2 with the Omarchy theme - #17293
Conversation
OpenCode 2 reads its TUI theme from cli.json and ignores the theme key in opencode.json, so fresh installs started on the stock theme. Ship cli.json with the system theme and add it for existing users who haven't picked one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
[Medium impact] The PR appears safe to merge, with the previously reported config-link issue remaining non-blocking. Findings
SummaryMoves the default OpenCode theme into
No new actionable issues were established since the previous review. Reviews (2) · Last reviewed commit: "Drop the OpenCode 1 settings from openco..." · Reviewed by Greptile |
| if updated=$(jq 'if has("theme") then empty else .theme = {name: "system"} end' "$cli_config" 2>/dev/null) && [[ -n $updated ]]; then | ||
| printf '%s\n' "$updated" >"$cli_config.tmp" | ||
| chmod 600 "$cli_config.tmp" | ||
| mv "$cli_config.tmp" "$cli_config" |
There was a problem hiding this comment.
If cli.json is a symlink to a dotfile repo and has no theme, this mv replaces the link with a regular file. The tracked file stays unchanged, and future edits to it no longer reach OpenCode. Resolve the link target before replacing the file, or write through the link.
Knowledge Base Used: Migration framework
OpenCode 2 ignores the theme key there, and spells the update policy update: "disable". Keep only that, since 2.x still reads it from opencode.json and would otherwise nag about updates mise owns. Co-Authored-By: Claude Opus 5.5 <[email protected]>
| "$schema": "https://opencode.ai/config.json", | ||
| "theme": "system", | ||
| "autoupdate": false | ||
| "update": "disable" |
There was a problem hiding this comment.
Shouldn't this stay as "autoupdate" option? https://opencode.ai/docs/config/#autoupdate @omarchybot
* Open OpenCode 2 with the Omarchy theme OpenCode 2 reads its TUI theme from cli.json and ignores the theme key in opencode.json, so fresh installs started on the stock theme. Ship cli.json with the system theme and add it for existing users who haven't picked one. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Drop the OpenCode 1 settings from opencode.json OpenCode 2 ignores the theme key there, and spells the update policy update: "disable". Keep only that, since 2.x still reads it from opencode.json and would otherwise nag about updates mise owns. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> (cherry picked from commit 73ae9cd)
OpenCode 2 reads its TUI theme from cli.json and ignores the theme key in opencode.json, so OpenCode v2.2.6 here ran on its stock theme while the script kept writing the 1.x key. The update policy is now `update: "disable"`, where `autoupdate: false` no longer stops the nag about updates mise owns. Follow Omarchy's config/opencode and its migration (omacom/omarchy#17293): write cli.json with the system theme unless OpenCode's own migration still has a tui.json or kv.json to carry over, leave a theme already picked there alone, and drop the two keys OpenCode 2 ignores from opencode.json.
OpenCode 2 moved its TUI settings into
~/.config/opencode/cli.jsonand no longer readsthemefromopencode.json, so after mise auto-updated to 2.x, OpenCode opened on its stock theme instead of following the Omarchy theme.config/opencode/cli.jsonwiththeme: {name: "system"}for new installs.config/opencode/opencode.jsonto OpenCode 2's form: drop the deadthemekey and spell the update policyupdate: "disable". 2.x still reads the update policy only fromopencode.json, so the file stays to keep it from nagging about updates mise owns.cli.jsonwithout a theme getssystem; a theme the user picked is left alonecli.json, the shipped one is copied in, unless an oldertui.jsonorkv.jsonexists, in which case OpenCode's own one-time migration carries the user's settings overTested the migration against temporary homes for each of those cases. Reviewed with Codex: no issues found.
🤖 Generated with Claude Code