LIFX Raycast Extension
Control your LIFX smart lights directly from Raycast with local network discovery and cloud API fallback.

Features
π€ Natural Language Control
- Type Commands Naturally: Control your lights by typing commands like "set to electric blue and make it cozy"
- Incredibly Smart Parsing: Recognizes 80+ colors, 50+ brightness levels, 30+ temperature keywords
- Compound Commands: Chain multiple actions together (e.g., "turn on, set to pastel pink, and dim a bit")
- Conversational: Say it however feels natural - "gimme some light", "make it super bright", "barely on night light"
- Profile Integration: Load saved profiles by name or tag (e.g., "switch to my sleep mode")
- Keyboard Shortcut: Press
Ctrl+Enter to execute your command
π Smart Connection
- LAN-First Discovery: Fast local network control (no internet required)
- HTTP API Fallback: Automatic fallback to cloud API if LAN unavailable
- Auto-Detection: Discovers all LIFX lights on your network within seconds
π‘ Comprehensive Light Control
- Power: Toggle lights on/off
- Brightness: 7 preset levels from 1% to 100%
- Color: 9 preset colors with emoji indicators (π΄ Red, π’ Green, π΅ Blue, etc.)
- Temperature: 8 white temperature presets (2500K - 9000K)
- Scenes: 9 one-click mood scenes (Warm Relax, Reading, Energize, Night, etc.)
π¦ Profile Management
- Save current light states as profiles
- Load saved profiles instantly
- Built-in profile management (save/load/delete)
π― Bulk Operations
- Control all lights simultaneously
- Turn all lights on/off together
- Set all lights to same brightness
β¨οΈ Keyboard Shortcuts
All actions have keyboard shortcuts for maximum efficiency:
Individual Light Control
Cmd+Shift+P - Toggle power
Cmd+Shift+B - Set brightness
Cmd+Shift+C - Set color
Cmd+Shift+T - Set temperature
Cmd+Shift+S - Save as profile
Cmd+Shift+L - Load profile
Quick Brightness
Cmd+1 - 100% brightness
Cmd+2 - 75% brightness
Cmd+3 - 50% brightness
Cmd+4 - 25% brightness
Color Scenes
Cmd+Shift+1-9 - Apply color scenes (Red, Green, Blue, Yellow, etc.)
All Lights Control
Cmd+Shift+O - Turn all lights on
Cmd+Shift+X - Turn all lights off
Cmd+Shift+1-4 - Set all lights to preset brightness
Other
Cmd+R - Refresh lights list
Installation
From Raycast Store (Recommended)
- Open Raycast
- Search for "LIFX" in the Extension Store
- Click "Install"
Requirements
- Raycast installed
- LIFX smart lights on your network
From Source (Development)
- Clone the Raycast extensions repository:
git clone https://github.com/raycast/extensions.git
cd extensions/lifx-controller
- Install dependencies:
npm install
- Build and import into Raycast:
npm run dev
Configuration
LAN Discovery (Recommended)
No configuration needed! The extension will automatically discover LIFX lights on your local network.
HTTP API Token (Optional Fallback)
If LAN discovery fails or you want remote control, you can add an HTTP API token:
- Go to https://cloud.lifx.com/settings
- Sign in with your LIFX account
- Click "Generate New Token"
- Copy the token
- Open Raycast β LIFX Controller β Preferences
- Paste your token in "LIFX HTTP API Token"
Preferences
- LIFX HTTP API Token: Optional token for HTTP API fallback
- Default Fade Duration: How long light transitions take (default: 1000ms)
- LAN Discovery Timeout: How long to wait for local network discovery (default: 5000ms)
- Enable LAN Discovery: Toggle local network discovery on/off
Usage
Natural Language Commands
The easiest way to control your lights is with natural language:
- Open Raycast
- Search for "LIFX Dashboard"
- Type your command in the search bar
- Press
Ctrl+Enter to execute
Example Commands:
Power & Basic
turn on / lights on / gimme light - Turn on lights
lights off / darkness / make it dark - Turn off lights
Colors (80+ recognized!)
set to red / electric blue / neon pink - Basic colors
deep blue / pale green / pastel pink - Color variations
sapphire / emerald / crimson / amber - Named colors
baby blue / hot pink / forest green - Descriptive colors
Brightness (50+ keywords!)
super bright / max brightness / brightest - Maximum
dim a bit / pretty dim / quite dim - Decrease
night light / barely on / barely lit - Very low
75% / half / medium - Specific levels
Temperature (30+ moods!)
warm white / cozy / relaxing / sunset - Warm
cool white / energizing / focus - Cool
daylight / morning / sunshine - Bright
candlelight / warm glow - Atmospheric
Compound Commands
turn on and set to blue - Multiple actions
electric blue and super bright - Color + brightness
cozy and dim a bit - Temperature + brightness
all lights to pastel pink and half brightness - Complex
Profiles
load my sleep mode / switch to sleep mode - By name
gimme my work preset / use the relax scene - Casual
Control Individual Lights
- Open Raycast
- Search for "LIFX Dashboard"
- Select a light
- Use actions to control it:
- Power on/off
- Set brightness, color, or temperature
- Apply preset scenes
- Save/load profiles
Control All Lights
When you have multiple lights, an "All Lights" section appears at the top:
- Turn all lights on/off
- Set all to same brightness
- Quick access via keyboard shortcuts
Save & Load Profiles
- Set your lights to desired state
- Press
Cmd+S on a light
- Name your profile
- Later, press
Cmd+L to load saved profiles
Troubleshooting
No Lights Discovered
- Ensure your LIFX lights are powered on
- Check that your computer is on the same network as your lights
- Try increasing the LAN Discovery Timeout in preferences
- Add an HTTP API token as fallback
Lights Not Responding
- Check if lights are reachable on your network
- Try refreshing the lights list (
Cmd+R)
- The extension will automatically try HTTP API if LAN fails
UI Not Updating
- This has been fixed in the latest version
- Make sure you're running the latest build
Development
Build
npm run build
Development Mode
npm run dev
Lint
npm run lint
Fix Linting Issues
npm run fix-lint
Tech Stack
- Raycast API: Extension framework
- lifx-lan-client: Local network control (LAN protocol)
- lifxjs: HTTP API control (cloud fallback)
- TypeScript: Type safety and better DX
- React: UI components
Project Structure
src/
βββ dashboard.tsx # Main dashboard command
βββ save-profile.tsx # Save profile command
βββ load-profile.tsx # Load profile command
βββ manage-profiles.tsx # Manage profiles command
βββ lib/
β βββ lifx-client.ts # Connection manager (LAN + HTTP)
β βββ lifx-lan.ts # LAN client wrapper
β βββ lifx-http.ts # HTTP client wrapper
β βββ nlp-parser.ts # Natural language parser
β βββ storage.ts # Profile storage
β βββ types.ts # TypeScript interfaces
βββ components/
β βββ LightListItem.tsx # Light list item with actions
β βββ LightGridItem.tsx # Light grid item with actions
β βββ BrightnessControl.tsx # Brightness picker
β βββ ColorPicker.tsx # Color picker
β βββ TemperatureControl.tsx # Temperature picker
βββ utils/
βββ validation.ts # Input validation
Architecture
Connection Strategy
- LAN First: Attempts local network discovery (fast, no internet)
- HTTP Fallback: Uses cloud API if LAN unavailable
- Auto-Deduplication: Merges lights from both sources
- Smart Failover: Switches between LAN/HTTP automatically on failure
Data Flow
User Action β LIFXClientManager β Try LAN β If fail, try HTTP β Update UI
License
MIT
Author
Created by nazzy_wazzy_lu
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Acknowledgments
- LIFX for making awesome smart lights
- Raycast for the amazing launcher platform
- lifx-lan-client for the LAN protocol implementation
- lifxjs for the HTTP API wrapper
Enjoy controlling your lights! π‘β¨