Skip to content

Open OpenCode 2 with the Omarchy theme - #17293

Merged
dhh merged 2 commits into
quattrofrom
worktree-opencode-cli-theme
Nov 1, 2026
Merged

dhh merged 2 commits into
quattrofrom
worktree-opencode-cli-theme

Conversation

@dhh

@dhh dhh commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

OpenCode 2 moved its TUI settings into ~/.config/opencode/cli.json and no longer reads theme from opencode.json, so after mise auto-updated to 2.x, OpenCode opened on its stock theme instead of following the Omarchy theme.

  • Ship config/opencode/cli.json with theme: {name: "system"} for new installs.
  • Trim config/opencode/opencode.json to OpenCode 2's form: drop the dead theme key and spell the update policy update: "disable". 2.x still reads the update policy only from opencode.json, so the file stays to keep it from nagging about updates mise owns.
  • Migration for existing users:
    • an existing cli.json without a theme gets system; a theme the user picked is left alone
    • with no cli.json, the shipped one is copied in, unless an older tui.json or kv.json exists, in which case OpenCode's own one-time migration carries the user's settings over

Tested the migration against temporary homes for each of those cases. Reviewed with Codex: no issues found.

🤖 Generated with Claude Code

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]>
@greptile-apps

greptile-apps Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with the previously reported config-link issue remaining non-blocking.

Findings

  1. P2 Config link is replaced ▶

Summary

Moves the default OpenCode theme into cli.json for OpenCode 2.

  • OpenCode 2 gets Omarchy's theme while existing settings stay respected.

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

Comment thread migrations/1793565796.sh
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"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Config link is replaced

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]>
@dhh
dhh merged commit 73ae9cd into quattro Nov 1, 2026
2 checks passed
@dhh
dhh deleted the worktree-opencode-cli-theme branch November 1, 2026 21:15
"$schema": "https://opencode.ai/config.json",
"theme": "system",
"autoupdate": false
"update": "disable"

@morgoth morgoth Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@emirb emirb added this to the 4.5 milestone Nov 5, 2026
berenddeboer pushed a commit to berenddeboer/omarchy that referenced this pull request Nov 6, 2026
* 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)
sogamoso added a commit to sogamoso/dotfiles that referenced this pull request Nov 10, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants