This guide will get you up and running with Refocus Shell in minutes.
Before starting, ensure you have the required dependencies installed:
- sqlite3 - Database for storing focus sessions
- notify-send - Desktop notifications (libnotify-bin on Debian/Ubuntu)
- jq - JSON processing for import/export features
The installer will automatically detect and install missing dependencies.
# Clone and install
git clone https://github.com/PeGa/refocus-shell
cd refocus-shell
./setup.sh install
# Restart your shell or source your profile
source ~/.bashrcLet's start your first focus session:
# Start focusing on a project
focus on "my-first-project"
# Check your status
focus status
# Work for a while... you'll get gentle nudges every 10 minutes
# Stop your session and add notes
focus offWhen you run focus off, you'll be prompted to add notes about what you accomplished:
📝 What did you accomplish during this focus session?
(Press Enter to skip, or type a brief description):
The basic Refocus Shell workflow is simple:
focus on "project-name"- You'll see
⏳ [project-name]in your prompt - Every 10 minutes, you'll get a gentle reminder
- The prompt works across all terminals
focus statusShows:
- Current project
- Time elapsed
- Total time on this project
- Session notes (if any)
focus offPrompts you to add notes about what you accomplished.
Here are the commands you'll use daily:
# Session management
focus on "project" # Start focusing
focus off # Stop and add notes
focus status # Check current status
focus pause # Pause (saves context notes)
focus continue # Resume paused session
# Quick history
focus past list 5 # Show last 5 sessions
focus past list -n 10 # Show last 10 sessions (flag format)
focus report today # Today's focus summary
# System control
focus enable # Enable focus tracking
focus disable # Disable focus tracking
focus help # Show all commandsRefocus Shell has three types of notifications:
When you're focusing: "You're focusing on: project (20m elapsed)"
- Appears every 10 minutes during active sessions
- Helps you stay aware of time passing
- Shows rounded time (10m, 20m, 30m, etc.)
When you're not focusing: "You're not focusing on any project"
- Gentle reminder every 10 minutes when idle
- Only appears if focus tracking is enabled
- Stops when you start a session or disable tracking
When you have a paused session: "Session paused: project - your notes"
- Reminds you about paused work
- Includes the context notes you added when pausing
# Control nudging
focus nudge enable # Enable nudges (default)
focus nudge disable # Disable nudges
focus nudge status # Check nudge status
focus nudge test # Test your notifications
# System-wide control
focus disable # Disable all focus tracking
focus enable # Re-enable focus trackingRefocus Shell remembers your last project:
# Start working on "coding"
focus on "coding"
focus off
# Later, just run focus on without a project name
focus on
# Automatically continues "coding"This is perfect for resuming work after breaks or across different terminal sessions.
The ⏳ [project] prompt indicator works across all terminals:
- Start a focus session in one terminal
- Open a new terminal → see the focus indicator
- Works in tmux, screen, and multiple terminal windows
- Updates automatically when you start/stop sessions
Session notes help you remember what you accomplished:
focus off
# Prompts: "What did you accomplish during this focus session?"focus notes add "project-name"
# Prompts for notes about your most recent session for that projectfocus past list # Shows sessions with notes
focus report today # Includes all notes in daily reportPerfect for stepping away without losing context:
# Pause your session
focus pause
# Prompts: "Focus paused. Please add notes for future recalling:"
# Resume later
focus continue
# Asks: "Include previous elapsed time? (y/N)"When to pause:
- Short breaks (coffee, bathroom, phone call)
- Interruptions that won't last long
- Switching contexts temporarily
When to stop (focus off):
- End of work session
- Switching to a different project
- Long breaks or end of day
Verify your installation is working:
# Check the command works
focus help
# Check database was created
ls ~/.local/refocus/refocus.db
# Test notifications
focus nudge test
# Start a test session
focus on "test"
focus status
focus offNow that you're set up:
- Session Management - Learn advanced session techniques
- Configuration - Customize your experience
- Reports - Generate focus analytics
- Data Management - Backup and manage your data
- Project names: Use descriptive, consistent names like
"web-development"or"client-work" - Notes: Be specific about what you accomplished for future reference
- Nudges: Start with default settings, adjust later if needed
- Multiple projects: You can only focus on one project at a time (this is intentional)
- Breaks: Use
focus pausefor short breaks,focus offwhen switching projects
Next: Session Management Guide