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

Open
opened 2026-02-16 17:27:31 -05:00 by yindo · 4 comments
Owner

Originally created by @guanghechen on GitHub (Jul 9, 2025).

Originally assigned to: @adamdotdevin on GitHub.

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 🙌

Originally created by @guanghechen on GitHub (Jul 9, 2025). Originally assigned to: @adamdotdevin on GitHub. > 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 🙌
Author
Owner

@nicoburniske commented on GitHub (Aug 23, 2025):

would also be great to reload externally. something like this

https://github.com/ghostty-org/ghostty/issues/7747

@nicoburniske commented on GitHub (Aug 23, 2025): would also be great to reload externally. something like this https://github.com/ghostty-org/ghostty/issues/7747
Author
Owner

@Masstronaut commented on GitHub (Oct 9, 2025):

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.

@Masstronaut commented on GitHub (Oct 9, 2025): 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.
Author
Owner

@malhashemi commented on GitHub (Nov 27, 2025):

@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.

@malhashemi commented on GitHub (Nov 27, 2025): @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.
Author
Owner

@malhashemi commented on GitHub (Nov 28, 2025):

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

@malhashemi commented on GitHub (Nov 28, 2025): 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 in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#587