FocusMe supports command-line arguments to start, stop, and list plans. This lets you automate plan control from scripts, scheduled tasks, or cron jobs without opening the FocusMe window.
Syntax
FocusMe.exe --start "Plan Name"
FocusMe.exe --stop "Plan Name"
FocusMe.exe --stop "Plan Name" --password "mypass"
FocusMe.exe --list
/Applications/FocusMe.app/Contents/MacOS/FocusMe --start "Plan Name"
/Applications/FocusMe.app/Contents/MacOS/FocusMe --stop "Plan Name"
/Applications/FocusMe.app/Contents/MacOS/FocusMe --stop "Plan Name" --password "mypass"
/Applications/FocusMe.app/Contents/MacOS/FocusMe --list
/Applications/FocusMe/FocusMe --start "Plan Name"
/Applications/FocusMe/FocusMe --stop "Plan Name"
/Applications/FocusMe/FocusMe --stop "Plan Name" --password "mypass"
/Applications/FocusMe/FocusMe --list
| Command | Description |
|---|
--start "Plan Name" | Start a plan by name |
--stop "Plan Name" | Stop a plan by name |
--stop "Plan Name" --password "pass" | Stop a password-protected plan |
--list | List all plans and their current status |
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 via IPC. 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.
This means you can safely call these commands regardless of whether FocusMe is open — it will do the right thing either way.
Exit Codes
Every command returns an exit code you can check in scripts:
| Code | Meaning |
|---|
0 | Success |
1 | Plan not found |
2 | Protection denied (plan cannot be stopped) |
3 | Invalid command or communication error |
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:
| Protection Type | Can Stop via CLI? |
|---|
| None (unprotected) | Yes |
| Password | Yes, with --password "correct_password" |
| Random Character | No — returns exit code 2 |
| Forced | No — returns exit code 2 |
Plans with Random Character or Forced protection cannot be stopped from the command line. This is intentional — these protection modes are designed to prevent you from bypassing your own plans.
Checking Exit Codes
PowerShell
cmd.exe
Bash (macOS / Linux)
& "C:\Program Files\FocusMe\FocusMe.exe" --start "Work Mode"
$LASTEXITCODE
The exit code is available in $LASTEXITCODE."C:\Program Files\FocusMe\FocusMe.exe" --start "Work Mode"
echo %errorlevel%
The prompt may visually overlap with the output line — this is cosmetic only and does not affect the command./Applications/FocusMe.app/Contents/MacOS/FocusMe --start "Work Mode"
echo $?
Use Cases
Scheduled Focus Time
Start a blocking plan at the same time every day:
Windows (Task Scheduler)
macOS / Linux (cron)
Program: "C:\Program Files\FocusMe\FocusMe.exe"
Arguments: --start "Work Mode"
Trigger: Daily at 9:00 AM
# crontab -e
0 9 * * * /Applications/FocusMe.app/Contents/MacOS/FocusMe --start "Work Mode"
This starts your “Work Mode” plan automatically every morning, even if you forget.
Script-Based Automation
Chain plan control into scripts to set up your work environment:
& "C:\Program Files\FocusMe\FocusMe.exe" --start "No Social Media"
& "C:\Program Files\FocusMe\FocusMe.exe" --start "No Games"
/Applications/FocusMe.app/Contents/MacOS/FocusMe --start "No Social Media"
/Applications/FocusMe.app/Contents/MacOS/FocusMe --start "No Games"
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:
& "C:\Program Files\FocusMe\FocusMe.exe" --list
/Applications/FocusMe.app/Contents/MacOS/FocusMe --list
This prints all your plans with their current status (active, inactive, scheduled).