A Terminal User Interface (TUI) package built with OpenTUI and React.
bun installRun the TUI in development mode:
bun run devRun the test suite:
bun testFor testing interactive CLI features, install tmux:
# macOS
brew install tmux
# Ubuntu/Debian
sudo apt-get install tmux
# Windows (via WSL)
wsl --install
sudo apt-get install tmuxThen run the proof-of-concept:
bun run test:tmux-pocSee src/tests/README.md for comprehensive testing documentation.
Build the package:
bun run buildRun the built TUI:
bun run startOr use the binary directly:
codebuff-tui- Built with OpenTUI for modern terminal interfaces
- Uses React for declarative component-based UI
- TypeScript support out of the box
The CLI auto-detects light/dark mode using multiple sources in order of priority:
-
Terminal colors (highest priority)
- Detects via OSC 10/11 queries to terminal background/foreground colors
- Updates within 5 seconds when terminal theme changes
- Supports: Terminal.app, iTerm2, WezTerm, kitty, Alacritty, Ghostty
- Works in tmux/screen via passthrough wrapping
-
IDE theme (when running in integrated terminal)
- VS Code/Cursor/VSCodium:
settings.json+VSCODE_THEME_KINDenv var - JetBrains (IntelliJ, PyCharm, etc.):
laf.xml+ env vars - Zed:
settings.json+ZED_TERMenv var - Updates within ~250ms via file watchers
- VS Code/Cursor/VSCodium:
-
OS/Platform theme (fallback)
- macOS:
defaults read -g AppleInterfaceStyle+ file watchers on.GlobalPreferences.plist,com.apple.Terminal.plist,com.googlecode.iterm2.plist - Windows: Registry keys for system theme
- Linux: GTK theme, GNOME/KDE settings
- Updates within ~250ms via file watchers (macOS)
- macOS:
-
Default dark (if all detection fails)
All detection methods run in parallel. Terminal colors take precedence when available
Manual refresh
- Send
SIGUSR2to the process to force a theme recomputation.