Turn your WiZ smart bulb into a real-time activity indicator for Claude Code.
The bulb lights up when Claude is working, turns off when it's done, stays blue for notifications (waiting for input) until the next Claude lifecycle event changes it, and flashes green when tasks complete.
Uses Claude Code hooks to trigger bash scripts that send UDP commands directly to your WiZ bulb on the local network. Zero external dependencies — just netcat (pre-installed on macOS/Linux).
| Claude Code Event | Bulb Behavior |
|---|---|
| You send a prompt | Warm white ON (2700K, 80%) |
| Claude finishes responding | OFF |
| Notification (waiting for input) | Persistent blue until the next Claude event |
| Task completed | Green flash, then warm white |
- A WiZ smart bulb on the same WiFi network
- Claude Code CLI
- macOS or Linux (uses
ncfor UDP)
git clone https://github.com/serafinsanchez/claude-code-wiz-light.git
cd claude-code-wiz-light
./install.shThe installer will:
- Ask for your bulb's IP address (find it in the WiZ app under Device Info)
- Test the connection
- Copy scripts to
~/.claude/hooks/wiz/ - Add hooks to your Claude Code settings
- Run a quick on/off test
./uninstall.shRemoves the scripts and hook configuration. Your other Claude Code hooks are preserved.
Open the WiZ app > tap your bulb > Settings (gear icon) > Device info > look for IP address.
Edit the installed scripts in ~/.claude/hooks/wiz/ to change behavior:
Edit ~/.claude/hooks/wiz/wiz-on.sh:
# Warm white at 80%
'{"id":1,"method":"setPilot","params":{"state":true,"temp":2700,"dimming":80}}'
# Cool daylight at full brightness
'{"id":1,"method":"setPilot","params":{"state":true,"temp":6200,"dimming":100}}'
# Custom RGB color (purple)
'{"id":1,"method":"setPilot","params":{"state":true,"r":128,"g":0,"b":255,"dimming":100}}'Edit wiz-notify.sh or wiz-complete.sh — modify the RGB values in the first setPilot call.
Edit ~/.claude/hooks/wiz/wiz-send.sh and update the default IP, or set the WIZ_BULB_IP environment variable:
export WIZ_BULB_IP=192.168.1.100| Parameter | Range | Description |
|---|---|---|
state |
true/false |
Power on/off |
temp |
2200-6200 | Color temperature in Kelvin |
dimming |
10-100 | Brightness percentage |
r, g, b |
0-255 | RGB color values |
sceneId |
1-35 | Built-in light scenes |
speed |
10-200 | Dynamic scene speed |
WiZ bulbs run a local UDP server on port 38899 that accepts JSON commands — no cloud, no authentication, no API keys. The scripts use netcat to send single UDP packets:
echo -n '{"id":1,"method":"setPilot","params":{"state":true}}' | nc -u -w1 192.168.1.248 38899Claude Code hooks are configured in ~/.claude/settings.json to run these scripts on lifecycle events like SessionStart, Stop, Notification, etc.
Bulb doesn't respond:
- Verify the IP: open the WiZ app > Device Info
- Check you're on the same WiFi network
- Test manually:
~/.claude/hooks/wiz/wiz-on.sh
Bulb IP changed:
- WiZ bulbs get IPs via DHCP, so the IP may change. Set a static IP/DHCP reservation in your router, or update
~/.claude/hooks/wiz/wiz-send.sh.
Scripts work manually but not via hooks:
- Run
claude --debugto see hook execution logs - Check
~/.claude/settings.jsonis valid JSON
MIT