nuphyctl is a Rust CLI for sending NuPhy keyboard HID commands to boards supported by drive.nuphy.io.
It currently supports:
- listing visible HID devices
- printing supported command paths
- setting main/backlight RGB effects
- setting side-light effects
- setting decorative/strip-light effects
- sending raw 64-byte HID reports for reverse engineering
cargo buildRun directly from the repo during development:
cargo run -- --helpOr install it locally:
cargo install --path .List HID devices visible to hidapi:
cargo run -- listPrint all supported command paths:
cargo run -- commandsShow help for a subcommand:
cargo run -- rgb set --helpSet a static backlight color (#RRGGBB or RRGGBB):
cargo run -- rgb set --hex ff0000Set backlight brightness (0-100):
cargo run -- rgb set --hex ff0000 --brightness 35Set an animated backlight effect with speed and direction:
cargo run -- rgb set --effect wave --hex 00aaff --speed 3 --direction leftUse a preset palette instead of a custom RGB color:
cargo run -- rgb set --effect wave --hex 000000 --color-mode preset --palette-index 2Set a side-light effect with a custom color:
cargo run -- rgb side --effect static --hex ffffff --brightness 70 --speed 2For side-light effects that do not use custom color, --hex is optional:
cargo run -- rgb side --effect neon --brightness 70 --speed 2Set a decorative/strip-light effect (experimental, model-dependent offsets):
cargo run -- rgb decorative --effect static --hex ff8800 --base-offset 17If your model uses a different decorative channel offset, override --base-offset.
Observed values so far include 17 for some 2-channel layouts and 35 for some 3-channel layouts.
Main/backlight effects:
ray, stair, static, breath, flower, wave, ripple, spout, galaxy, rotation, ripple2, point, grid, time, rain, ribbon, gaming, identify, windmill, diagonal
Side/decorative effects:
time, neon, static, breathe, rhythm
If more than one matching HID interface is present, narrow the target with one or more selector flags.
Target a specific vendor/product pair:
cargo run -- rgb set --hex 00ff00 --vid 0x19f5 --pid 0x1028Target a specific hidraw path:
cargo run -- rgb set --hex 00ff00 --path /dev/hidraw5Narrow by interface and usage fields from list output:
cargo run -- rgb set --hex 00ff00 --vid 0x19f5 --pid 0x1028 --iface 3 --usage-page 0x0001 --usage 0x0000Available selectors:
--vid--pid--path--iface--usage-page--usage
If you do not pass a selector, nuphyctl tries to choose the most likely keyboard control interface automatically.
Send a raw 64-byte HID packet:
cargo run -- raw send --hex "55d60093656564650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"You can also override the HID report ID when needed:
cargo run -- raw send --report-id 0 --hex "...128 hex chars..."rgb set,rgb side, andrgb decorativeautomatically retry a few common transient HID failuresrgb sideandrgb decorativerequire--hexonly for effects that use custom RGB colorraw sendexpects exactly 64 payload bytes
Detailed protocol notes and the DevTools capture workflow live in docs/reverse-engineering.md.