The company Luxafor sells a little RGB LED "flag" that connects to a PC via USB-A, and I love it.
But I wanted a CLI client. So I wrote one. And you can use it, if you'd like.
Prebuilt binaries for Linux, macOS, and Windows are available on the releases page. Download the one for your platform and run it — no dependencies needed.
Works on macOS, Linux (including Raspberry Pi OS), and Windows.
You need CMake (3.18+) and a C compiler. If hidapi is installed on your system, the build uses it; otherwise CMake automatically downloads and builds hidapi from source, so installing it is optional.
- macOS:
brew install cmake(optionallybrew install hidapi) - Raspberry Pi OS / Debian / Ubuntu:
sudo apt install cmake build-essential libudev-dev - Windows: Visual Studio 2022 (with the "Desktop development with C++" workload) and CMake
git clone https://github.com/mike-rogers/luxafor-cli.git
From within the luxafor-cli directory:
cmake -B build
cmake --build build --config Release
The binary lands in build/ (or build/Release/ with Visual Studio).
To force building hidapi from source even when a system copy exists, configure with -DLUXAFOR_VENDORED_HIDAPI=ON.
./luxafor blue
The color argument can either be a simple color (blue, green, etc.) or a hex value, e.g. 0x043f2c.
Beyond a static color, the Flag's other effects are supported:
luxafor --brightness 25 red # dim it down (0-100, perceptually scaled)
luxafor --fade 60 red # fade to red (0-255, higher is slower)
luxafor --strobe 20 --repeat 5 green # strobe green 5 times
luxafor --wave 3 --speed 30 blue # wave effect (types 1-5)
luxafor --pattern 5 # built-in pattern (1-8)
luxafor --led front blue # target LEDs: 1-6, front, back, all
Run luxafor --help for the full option reference, or luxafor --version to see which release you have.
On Linux you may need sudo to access the device. To allow non-root access, install the included udev rule:
sudo cp 99-luxafor.rules /etc/udev/rules.d/
sudo udevadm control --reload && sudo udevadm trigger
This project has been released with the MIT license.