Syntax
- Windows
- macOS
- Linux
Plan names are case-insensitive —
"Work Mode" and "work mode" both match the same plan.
How It Works
- If FocusMe is already running, the command is sent to the running instance. The result is printed to the console.
- If FocusMe is not running, it launches minimized to the system tray, processes the command, prints the result, and stays running to enforce the plan.
Exit Codes
Every command returns an exit code you can check in scripts:Protection Rules
Starting a plan with--start is always allowed, regardless of protection settings.
Stopping a plan with --stop depends on the plan’s protection level:
Checking Exit Codes
- PowerShell
- cmd.exe
- Bash (macOS / Linux)
$LASTEXITCODE.Use Cases
Scheduled Focus Time
Start a blocking plan at the same time every day:- Windows (Task Scheduler)
- macOS / Linux (cron)
Script-Based Automation
Chain plan control into scripts to set up your work environment:- PowerShell
- Bash
Network-Based Triggers
Combine with automation tools to start plans based on context — for example, activating a “Work Mode” plan when you connect to your office Wi-Fi network.Checking Plan Status
Use--list to see which plans are running before taking action:
- Windows
- macOS / Linux