Snag help › Snag for the desktop

Command line

snag <command> [options]

Commands

CommandDoesNeeds the daemon
runthe daemon: tray icon, timer window, idle detection. One per session-
startstart the timer on the task last worked onyes
stopstop the running timeryes
togglestop if running, start if notyes
showraise and focus the timer windowyes
statusprint what the timer is doingyes
reloadre-read the stored token and resume syncing (login does this itself)yes
captureopen the capture boxno (opens its own box without one)
loginstore a personal access token after checking itno
logoutremove the stored tokenno
whoamithe account, abilities, expiry and store of the stored tokenno
doctorwhat this machine can do; see Troubleshootingno
tasksthe task picker's list as JSONno
retrotime entries from git history; see Time from git historyno
observedwhat observation has recorded; see Observationno
forgetdelete what observation recordedno
-h, --helpusageno
-V, --versionthe version, one lineno

Commands that need the daemon talk to it over a socket. With no daemon running they say so and exit 1; they never start one.

run

FlagMeans
--db PATHthe SQLite file to use
--memoryin-memory database; nothing is kept, nothing syncs
--traystart with no window shown
--label MODEoff, duration or duration+project
--instance URLthe server to sync with
--task P:T:PROJECT:TASKa task to start on when the database has no history: project id, task id, project name, task name
--seconds Nshut down cleanly after N seconds
--idle-threshold Nseconds with no input before an idle span opens
--idle-grace Nseconds a prompt waits before it becomes unanswered
--idle-advisoryrecord idle spans, never prompt
--no-idleturn idle detection off

capture

FlagMeans
--kind task or --kind noteopen as this kind
--notesame as --kind note

login

FlagMeans
--instance URLuse this server and skip the prompt
--no-browserprint the token page rather than opening it

With standard input not a terminal, login reads the token from it and prompts for nothing.

doctor, observed

--json prints the same facts as JSON.

forget

--all also deletes derivations, and the sightings they were built from.

tasks

Prints one JSON object:

{
  "source": {"kind": "cached", "as_of": "2026-10-16T09:00:00Z"},
  "tasks": [ ... ]
}

source.kind is cached (the fetched list), stale (fetched, but the last refresh failed; why says why) or local (only tasks this machine has logged against).

Exit codes

CodeMeans
0done
1refused, no daemon to ask, or (for doctor) something needs attention
2the command line was wrong
3run found another daemon already running

Next: Where data goes