Control a Tuya smart light to show Claude Code status. Your light changes color when Claude is thinking, running tools, asking a question, or encounters an error — and glows a warm dim yellow when idle.
| State | Color |
|---|---|
| Thinking | Purple |
| Running | Blue |
| Question | Yellow |
| Success | Green |
| Error | Red |
| Done | Warm Yellow (dim) |
npm install -g claudelightYou'll need the device ID, local key, and local IP of your Tuya smart light. The easiest way to get these is with tinytuya:
pip install tinytuya
python -m tinytuya wizardThis will walk you through linking your Tuya IoT Platform account and scanning your local network for devices. You'll need to:
- Create a Tuya IoT Platform account and a Cloud project
- Link your Tuya/Smart Life app account to the project
- Run the wizard — it outputs a
devices.jsonwith each device'sid,key, andip
Create a config file at ~/.config/claudelight/.env:
mkdir -p ~/.config/claudelight
cat > ~/.config/claudelight/.env << 'EOF'
CLAUDELIGHT_DEVICE_ID=your_device_id
CLAUDELIGHT_KEY=your_local_key
CLAUDELIGHT_IP=192.168.1.100
CLAUDELIGHT_VERSION=3.5
EOFCLAUDELIGHT_VERSION is optional and defaults to 3.5.
For multiple devices, use comma-separated values:
CLAUDELIGHT_DEVICE_ID=id1,id2
CLAUDELIGHT_KEY=key1,key2
CLAUDELIGHT_IP=192.168.1.100,192.168.1.101
Alternatively, you can set these as environment variables in your shell profile.
claude-light setup-hooksThis adds hooks to ~/.claude/settings.json so Claude Code automatically triggers the light on lifecycle events.
claude-light thinking # Purple
claude-light running # Blue
claude-light question # Yellow
claude-light success # Green
claude-light error # Red
claude-light done # Warm yellow (dim)