Skip to content

[Feature Ask] Hot reload or add keymap to reload the theme #815

Closed

Description

@guanghechen

First off, thanks for building such an awesome AI agent CLI — really enjoying it so far!

I’m wondering if it’s possible to reload the active theme after editing files in the themes/ directory, or to trigger a theme refresh via a command or keybinding.

My use case: I frequently change my terminal color scheme and would love a way to apply the updated OpenCode theme without having to restart the app.

Another possible use case is to tweak the customized theme scheme, which also could help if the opencode can auto reload the new theme colors.

Would be great to support hot-reloading or a /reload-theme command!

Thanks again 🙌

Activity

  1. nicoburniske commented on Aug 23, 2025

    @nicoburniske

    would also be great to reload externally. something like this

    ghostty-org/ghostty#7747

  2. Masstronaut commented on Oct 9, 2025

    @Masstronaut

    I would also really like hot reloading to happen. I toggle between light/dark themes on my machine based on the real-world environment conditions. Opencode will correctly use the right light/dark theming at launch, but if my system theme changes while opencode is running it does not respond, and the only solution I've found is to quit the opencode session and then restart it with opencode -c.

    While this works, it's quite jarring after working for an hour in dark mode to switch to a tmux window that has an old opencode session which didn't switch and get blasted by light mode colors. It would be really nice for this to change automatically with the rest of my system.

  3. malhashemi commented on Nov 27, 2025

    @malhashemi
    Contributor

    @adamdotdevin / @thdxr / @rekram1-node Now that we have the new TUI, can you we do something about this? Many people have all sort of theming/palettes automation and this is really breaking the immersion, I am sure the sexiest TUI in town wouldn't be ok with this.

  4. malhashemi commented on Nov 28, 2025

    @malhashemi
    Contributor

    Hey @thdxr / @rekram1-node / @adamdotdevin ! Just opened a PR for this theme hot-reload functionality 🎉

    The implementation adds multiple ways to reload themes without restarting:

    • /reload-theme command for manual reloads
    • File watchers that auto-reload when you edit config/themes
    • Window resize handling to re-detect terminal colors for the "system" theme
    • Signal handlers (SIGUSR1/SIGUSR2) for external automation integration

    Also made the "system" theme background transparent so terminal opacity can show through, which looks pretty slick! (Was already how things worked before the new TUI)

    No more getting blasted by mismatched light/dark colors when switching tmux windows 😅

    Feel free to edit the PR as you see fit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions