v0.1.0

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-cli

Why

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.

1

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 link
2

Pair

Run setup. It discovers your bridge automatically.

hue setup
3

Press

Press the physical button on your Hue Bridge when prompted. The CLI retries up to 3 times.

4

Done

Credentials saved locally. Start controlling your lights.

hue rooms

How auth works

1

Local REST API

The Hue Bridge runs an HTTP API on your LAN. No cloud, no internet required.

2

Physical button = auth

Pressing the bridge button + a POST request generates an API key. No accounts, no OAuth.

3

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 -t

Combine brightness, color, and temperature

hue scene <name>

Activate a scene

hue breathe <target> [sec]

Pulse effect

Info

hue

Show all lights grouped by room

hue status [target]

Status of a specific room or light

hue lights

List all lights

hue rooms

List rooms and zones

hue scenes [room]

List available scenes

Setup

hue setup

Interactive 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 status

Reference

Colors and temperatures

Named colors, hex values, and temperature presets. Or pass a raw Kelvin value.

Colors

red
orange
yellow
lime
green
cyan
blue
purple
magenta
pink
hotpink
lavender
coral
turquoise
gold
white

Also supports hex values: hue color bedroom #ff6b35

Temperatures

candle2000K
warm2700K
soft3000K
neutral4000K
cool5000K
daylight6500K

Or 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 link

Pair 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