Back to all projects
Live

Focus Mode CLI

Create the perfect focus environment ๐ŸŽฏ

A CLI tool that optimizes your smart home lighting for focus sessions. Saves light state, sets optimal focus lighting, tracks sessions, and restores when done.

February 2026
1 night (nightly build)
Bash ยท Philips Hue API ยท Lutron Caseta ยท CLI
Focus Mode CLI

Distracted by Environment

Lighting affects focus and productivity. Manually adjusting lights breaks flow.

  • 1Manually adjusting lights disrupts focus
  • 2No quick way to enter 'focus mode'
  • 3Wanted to track focus session history
  • 4Needed to restore lights after sessions

One Command Focus Environment

Type 'focus start' and lights adjust to research-backed optimal settings. Restores previous lighting when done.

Smart Light Control

Sets Hue to warm 3000K at 70% brightness

State Preservation

Saves and restores your previous light settings

Session Tracking

Logs all focus sessions with duration

Timer Support

Optional countdown for timed sessions

Screenshots

Focus mode environment
Optimal warm lighting for deep focus work

Technical Deep Dive

Architecture

Bash script controlling Philips Hue via REST API and Lutron Caseta via Python bridge.

Tech Stack

BashPhilips Hue APILutron CasetaCLI

Challenges & Solutions

Challenge

Coordinating multiple smart home systems

Solution

Abstracted light control into functions for Hue and Lutron

Challenge

Preserving light state

Solution

JSON state files that capture full light configuration

Results & Impact

One command to enter the zone.

Highlights

  • Research-backed lighting settings
  • Zero friction to start focusing
  • Session history for productivity tracking

Lessons Learned

  • โ†’Environment matters for productivity
  • โ†’CLI tools can control the physical world
  • โ†’Simple automation removes daily friction

Like what you see?

Check out more of Dave's projects and case studies.

View All Projects