hueControl your lights from the terminal
A fast CLI for Philips Hue. Fuzzy-match room names, set colors and brightness, activate scenes. No cloud accounts required - just press a button.
$ npm install -g hue-cliWhy
Why use hue-cli
Zero-friction auth
No cloud accounts, no OAuth, no API keys. Press the button on your bridge, press Enter. That's it.
Fuzzy matching
Type 'hue on bed' and it matches 'Bedroom'. No need to remember exact light or room names.
Natural shorthand
Skip the subcommands. Just type 'hue kitchen blue 50%' and it figures out the rest.
Setup
Up and running in 60 seconds
Interactive setup walks you through everything. Multiple bridges? It asks you to pick. Button not pressed in time? It retries.
Install
Clone the repo, install dependencies, and link the CLI globally.
git clone git@github.com:developersdigest/hue-cli.git
cd hue-cli && npm install && npm linkPair
Run setup. It discovers your bridge automatically.
hue setupPress
Press the physical button on your Hue Bridge when prompted. The CLI retries up to 3 times.
Done
Credentials saved locally. Start controlling your lights.
hue roomsHow auth works
Local REST API
The Hue Bridge runs an HTTP API on your LAN. No cloud, no internet required.
Physical button = auth
Pressing the bridge button + a POST request generates an API key. No accounts, no OAuth.
Key never expires
Stored at ~/.config/hue/config.json. Pair once, use forever.
Commands
Everything you need
Explicit commands when you want precision. Natural shorthand when you want speed.
Control
hue on [target]Turn on lights, rooms, or all
hue off [target]Turn off lights, rooms, or all
hue toggle [target]Toggle lights on/off
hue dim <target> <0-100>Set brightness
hue color <target> <color>Set color by name or #hex
hue temp <target> <value>Set color temperature
hue set <target> -b -c -tCombine brightness, color, and temperature
hue scene <name>Activate a scene
hue breathe <target> [sec]Pulse effect
Info
hueShow all lights grouped by room
hue status [target]Status of a specific room or light
hue lightsList all lights
hue roomsList rooms and zones
hue scenes [room]List available scenes
Setup
hue setupInteractive bridge discovery and pairing
hue setup --ip <addr>Pair with a specific bridge IP
Natural shorthand
Skip the subcommands. Just type what you want.
$ hue office blue # color
$ hue office 50% # brightness
$ hue office orange 100% # color + brightness
$ hue kitchen warm 60% # temperature + brightness
$ hue bedroom off # turn off
$ hue bedroom # check statusReference
Colors and temperatures
Named colors, hex values, and temperature presets. Or pass a raw Kelvin value.
Colors
redorangeyellowlimegreencyanbluepurplemagentapinkhotpinklavendercoralturquoisegoldwhiteAlso supports hex values: hue color bedroom #ff6b35
Temperatures
candle2000Kwarm2700Ksoft3000Kneutral4000Kcool5000Kdaylight6500KOr pass raw Kelvin: hue temp bedroom 3200
Get started
Install hue-cli
Clone, install, pair. Three commands and you're controlling your lights.
Install from source
$ git clone git@github.com:developersdigest/hue-cli.git
$ cd hue-cli && npm install && npm linkPair with your bridge
$ hue setup$ hue # see all your lights
$ hue on kitchen # turn on the kitchen
$ hue office blue 80% # blue at 80% brightness
$ hue temp bedroom warm # warm white
$ hue scene relax # activate a scene