Add Focus Mode#1
Merged
Merged
Conversation
Adds auto-detection of machine capabilities (bluetooth, Spotify, Hue, Slack, Sonos, etc.), config read/write, website blocking via /etc/hosts, app quitting via osascript, DND, music control across 6 sources, git stats tracking, Obsidian logging, and notification helpers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Setup wizard auto-detects machine capabilities (bluetooth devices, Spotify, Hue rooms, Slack, Obsidian, etc.) and only shows relevant questions. Supports website blocking (always vs ask-each-time), app quitting, bluetooth auto-connect, music from 6 sources, Hue lights, DND, Slack DND, calendar blocking, timer notifications, Obsidian logging, and Telegram notifications. Focus start shows receipt with git stats on session end. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds `openpaw focus` (start), `openpaw focus setup`, and `openpaw focus configure` commands. Adds Focus Mode option to the configure menu. Registers c-focus in the skill catalog. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Creates skills/c-focus/SKILL.md with full usage instructions for Claude. Updates CLAUDE.md generation to include Focus Mode section when configured, so Claude knows to suggest `openpaw focus` when users express intent to concentrate. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
execSync calls (osascript, etc.) inside detectCapabilities() were corrupting the terminal raw mode state, causing the duration text input to glitch. Moving detection before p.intro() fixes it. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Custom sites can still be added during setup via the comma-separated text prompt. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Simplified to 3 steps: select sites → add custom → mark which ask each time. Removed twitter.com (x.com covers it). Same cleaner flow for app quitting. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
clack p.text returns placeholder on empty submit. Switched to defaultValue: "" so hitting enter skips without adding sites. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Removed always-available "Open a URL" and "Local file" fallbacks. Music prompt only appears if Spotify, Apple Music, Sonos, or yt-dlp is detected on the machine. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Websites: "Custom..." option in the multiselect — text input only appears when selected. Music: preset playlists per source (lo-fi, white noise, nature, rain, waterfall, brown noise, etc.) with a Custom option for typing your own query/URL. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
yt-dlp needs a URL or ytsearch: prefix — plain strings like "white noise 1 hour" would fail. Now auto-prefixes ytsearch1: for non-URL queries so presets actually work. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Uses detached spawn to sleep for N minutes then fire terminal-notifier. Survives after the CLI process exits. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove calendarBlock (was never implemented, just a dead toggle) - Remove telegramNotify (was calling local notification, not Telegram) - Fix lights color placeholder submitting "warm" on empty enter - Fix unused total variable in printConfig - Fix sudo site blocking: use stdio inherit so user can enter password - Remove dead url/local music source code paths - Timer option only shown when terminal-notifier is detected Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds `openpaw focus start [--all]`, `openpaw focus end`, and `openpaw focus status` — plain text output that Claude can read and act on. Claude starts sessions, reads the receipt on end, and summarizes the session naturally. Updates SKILL.md with full instructions for Claude: when to use start vs start --all, how to handle ask-each-time items in conversation, and how to summarize the focus receipt. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When focus starts, a background process sleeps for N minutes then runs `openpaw focus auto-end`. This spawns a Haiku session via the Claude Agent SDK that restores the environment, reads the git stats receipt, writes an encouraging summary, and delivers it via Telegram (or native notification as fallback). Same pattern as the scheduler. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Instead of wrapping everything in CLI commands, the SKILL.md now gives Claude the exact shell commands to run for each step (block sites, quit apps, connect bluetooth, play music, set lights, DND, Slack). Claude reads the config, asks about ask-each-time items in conversation, executes commands directly, and handles errors naturally. CLI still exists for setup wizard and auto-end timer. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When the user runs `openpaw focus setup`, the wizard now generates a personalized SKILL.md at ~/.claude/skills/c-focus/ with their exact preferences baked in — blocked sites, apps, music commands, bluetooth device, lights, DND, etc. Claude reads one file with everything it needs to orchestrate a focus session. Also removes stale calendarBlock and telegramNotify from config init. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Focus Mode doesn't need `openpaw add focus` since it has no external CLI tools to install. `openpaw focus setup` is the single entry point that writes the config JSON and generates the personalized SKILL.md. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Preferences are already baked into the SKILL.md — Claude doesn't need to read the JSON file. The JSON exists for the CLI commands (auto-end, start, end, status), not for Claude. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Single source of truth: the JSON config. SKILL.md is now a static template that tells Claude to read ~/.config/openpaw/focus.json for preferences and shows the commands for each feature. Setup writes both files, configure only touches the JSON. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude orchestrates focus sessions, not the CLI. Now `openpaw focus` shows your saved preferences and active session status. Tells you to ask Claude to "focus" or "lock in" to start. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Matches the main wizard pattern — global ~/.claude/skills/ (with hint showing how many skills are already there), project .claude/skills/, or custom path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Little 🐾 walks across the terminal between each section — sniffing system, distractions, apps, bluetooth, vibes, lights, finishing up, and saving config. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
openpaw focus setup) to configure distraction blocking — sites, apps, bluetooth, music, lights, DND, Slack, timerWhat's included
openpaw focus setup— interactive wizard with auto-detection, music presets, color picker, skill directory promptopenpaw focus— shows saved configopenpaw focus start/end/status— non-interactive commands for Claudeopenpaw focus auto-end— background timer + Telegram summaryTest plan
openpaw focus setup— full wizard flowopenpaw focus— shows config~/.config/openpaw/focus.jsonwritten🐾 Generated with Claude Code