Automatically sync Claude Code theme with macOS dark/light mode.
When you toggle macOS appearance, this daemon instantly updates Claude Code's theme setting so your next session matches your system theme.
git clone https://github.com/alfredomtx/claude-theme-sync.git
cd claude-theme-sync
./install.shThat's it! The daemon is now running and will start automatically on login.
- macOS
- Xcode Command Line Tools (
xcode-select --install) - Claude Code
- A lightweight Swift daemon listens to macOS theme change notifications
- When the system theme changes, it updates
~/.claude.jsonwith the matching theme - All Claude Code sessions update in real-time
# Check if running
launchctl list | grep claude-theme-sync
# View logs
tail -f ~/.claude/theme-sync/claude-theme-sync.log
# Restart
launchctl unload ~/Library/LaunchAgents/com.claude.theme-sync.plist
launchctl load ~/Library/LaunchAgents/com.claude.theme-sync.plist~/.claude/theme-sync/uninstall.shClaude Code stores its theme preference in ~/.claude.json:
{
"theme": "dark",
...
}This daemon watches for AppleInterfaceThemeChangedNotification and updates that field when macOS appearance changes.
MIT