A terminal-based Philips Hue control application written in Go.
- Bridge Discovery: Automatic discovery via mDNS and Philips Hue cloud
- Bridge Pairing: Easy link button pairing flow
- Light Control: Toggle, brightness, color temperature
- Room Grouping: Lights organized by room with group controls
- Scene Activation: Browse and activate scenes
- Real-time Updates: Server-sent events for live state updates
- Search: Filter lights by name
- Keyboard-driven: Full vim-style navigation
brew tap angristan/tap
brew install hue-tuiDownload the latest release from the releases page.
go install github.com/angristan/hue-tui/cmd/hue@latestgit clone https://github.com/angristan/hue-tui
cd hue-tui
make build
./huehueOn first run, the app will:
- Search for Hue bridges on your network
- Prompt you to press the link button on your bridge
- Save the connection credentials for future use
| Key | Action |
|---|---|
j / ↓ |
Move down |
k / ↑ |
Move up |
h / ← |
Decrease brightness |
l / → |
Increase brightness |
| Key | Action |
|---|---|
Space |
Toggle light on/off |
0 |
Set brightness to 100% |
1-9 |
Set brightness to 10-90% |
w |
Warmer color temperature |
c |
Cooler color temperature |
| Key | Action |
|---|---|
a |
Turn all lights in room on |
x |
Turn all lights in room off |
| Key | Action |
|---|---|
s |
Open scenes modal |
/ |
Search lights |
Tab |
Toggle side panel |
r |
Refresh |
q |
Quit |
Configuration is stored in ~/.config/hue-cli/config.json:
{
"bridges": [
{
"host": "192.168.1.100",
"username": "<app-key>",
"bridge_id": "001788FFFE123456"
}
],
"last_bridge_id": "001788FFFE123456"
}- Philips Hue Bridge (v2 API)
- Network access to the bridge
| Component | Library |
|---|---|
| TUI Framework | Bubble Tea |
| Styling | Lip Gloss |
| mDNS Discovery | hashicorp/mdns |
| WebSocket | gorilla/websocket |
hue-tui/
├── cmd/hue/ Entry point
└── internal/
├── api/ Hue Bridge V2 API client
│ ├── client.go HTTP client
│ ├── discovery.go mDNS + cloud discovery
│ ├── events.go Server-sent events
│ └── pairing.go Link button pairing
├── config/ Configuration management
├── models/ Data models (Light, Room, Scene, Color)
└── tui/ Terminal UI
├── screens/ Setup, Main, Scenes screens
├── components/ Reusable UI components
├── styles/ Color theme
└── messages/ Cross-screen messages
# Build
make build
# Run
make run
# Test
make test
# Lint (requires golangci-lint)
make lint
# Format
make fmtMIT