Drive a VIA/QMK keyboard's RGB from the host — and give your coding agent a physical presence on your desk.
glow sets your keyboard's RGB matrix to a solid color by talking to its
VIA raw-HID interface directly. No firmware flashing, no VIA app open,
no daemon — just a command:
glow purple
glow green
glow hue 96 # any hue on QMK's 0-255 wheelIt started as a joke — I bought a Keychron Q0 Mini, which is basically one giant key. Then I saw Work Louder x OpenAI's Co-Lab, where the keyboard's light reflects the AI's state, thought "huh, how hard could that beee," and this is the result: the big button now glows with what Claude is doing.
It drives more than one board at a time, too — a single glow purple
lights every configured keyboard (my Q0, a K6 HE, and a Framework Laptop 16
keyboard), so the whole desk shows Claude's state.
Wire glow to Claude Code hooks
and your keyboard becomes a live status light:
| Claude Code event | color | meaning |
|---|---|---|
SessionStart |
purple | idle / ready |
UserPromptSubmit |
blue | working |
Stop |
green | your turn |
Notification |
orange | needs your input |
Glance at it from across the room and you know Claude's state without
looking at the screen. Add to ~/.claude/settings.json:
{
"hooks": {
"SessionStart": [{ "hooks": [{ "type": "command", "command": "/path/to/glow/glow-hook purple" }] }],
"UserPromptSubmit": [{ "hooks": [{ "type": "command", "command": "/path/to/glow/glow-hook blue" }] }],
"Stop": [{ "hooks": [{ "type": "command", "command": "/path/to/glow/glow-hook green" }] }],
"Notification": [{ "hooks": [{ "type": "command", "command": "/path/to/glow/glow-hook orange" }] }]
}
}glow-hook runs glow backgrounded and never errors your session (an
unplugged keyboard just does nothing). It skips a color the board already
shows (the last one glow set, kept in $XDG_RUNTIME_DIR/glow-color), so a
hook that fires often, like PreToolUse, costs nothing, and it takes a lock
so concurrent hooks don't race. It's not Claude-specific — anything
that can run a command can drive the light: CI status, a build, a
pomodoro, a deploy.
-
A QMK keyboard with VIA + RGB matrix enabled (most Keychron Q/V/K boards qualify). glow talks to the VIA raw-HID interface (USB HID usage page
0xFF60), so nothing needs flashing. -
Python 3 with
hidapi. Theglowwrapper runs directly ifhidimports, otherwise builds a python with it once withnix-buildinto./.pythonand uses that. -
Permission to open the raw HID device. On Linux the device is usually root-owned; add a udev rule for your keyboard's vendor id, e.g.:
# /etc/udev/rules.d/99-glow.rules (replace 3434 with your vendor id) KERNEL=="hidraw*", ATTRS{idVendor}=="3434", MODE="0660", GROUP="input", TAG+="uaccess"and be in the
inputgroup. Reload withudevadm control --reload && udevadm trigger.
By default glow drives three boards — the Keychron Q0 Mini 8K (3434:040b),
the Framework Laptop 16 keyboard (32ac:0012), and the Keychron K6 HE
(3434:0e60). Set GLOW_BOARDS to a space-separated list of vid:pid (hex)
to target your own. Find ids with lsusb:
# just one board
GLOW_BOARDS="3434:040b" glow purple
# several at once — all light together
GLOW_BOARDS="3434:040b 32ac:0012" glow greenHall-effect boards work too: the K6 HE is a different firmware lineage from Keychron's regular QMK boards, but it still exposes the same VIA raw-HID interface, so nothing special is needed.
A board that isn't plugged in is skipped, so an unplugged keyboard never
fails the others. GLOW_VID / GLOW_PID still work for a single board
(back-compat).
QMK's VIA feature exposes a raw-HID interface (usage page 0xFF60) that
the VIA app uses to configure the board live. glow speaks the same
protocol. To set a solid color it sends rgb_matrix commands:
report = [0x00, cmd, channel, value_id, ...args] # padded to 33 bytes
cmd 0x07 = set, 0x09 = save
channel 0x03 = rgb_matrix
value_id 1 = brightness, 2 = effect, 4 = color(hue, sat)
effect 1 = RGB_MATRIX_SOLID_COLOR
glow never sends save (0x09), which writes the settings to the board's flash: the color is live only, and the board comes back from a replug in the color it had saved until glow sets one again.
The one gotcha that cost an hour: value_id 3 is effect speed, not
effect. Send the effect to id 3 and the color changes but the animation
never stops — the effect id is 2 (see qmk/via.h).
MIT