Snag help › Snag for the desktop

Settings

Settings live in ~/.config/snag/config.toml ($XDG_CONFIG_HOME/snag/config.toml). The first time Snag runs it writes this file with every setting present and commented out, showing its default. Uncomment a line to change it.

A command-line flag beats the file, and the file beats the built-in default.

An unknown key or a file that will not parse stops Snag at start with the line named. Fix the line, or delete the file and a fresh one is written.

Restart the daemon (systemctl --user restart snag) after editing.

Top level

KeyDefaultMeans
instance_urlthe Snag serverthe server address. snag login offers it as the default
database~/.local/share/snag/timer.sqlitethe local database; back this file up
label"duration+project"what the bar shows while running: off, duration, duration+project
default_project"" (unset)where a capture with no #project goes, by project name. See Quick capture

[idle]

KeyDefaultMeans
threshold360seconds with no input before an idle span opens
grace600seconds an idle prompt waits before it becomes unanswered. Nothing is discarded either way. Minimum 1
advisory_onlyfalserecord idle spans and never prompt

[observe]

All off by default. See Observation.

KeyDefaultMeans
windowfalserecord the focused window's title and application
shellfalserecord the focused terminal's directory and git repository
agentfalserecord which repository a coding agent session is on (metadata only)
screenfalsenot built
commitfalsereserved; no effect in this version
title_deny["1Password", "Bitwarden", "KeePass", "password", "Private Browsing"]window titles never recorded. Replaces the default list

Example

default_project = "Inbox"
label = "duration"

[idle]
threshold = 600
advisory_only = false

[observe]
shell = true

Flags that override the file

Flag on snag runOverrides
--instance URLinstance_url
--db PATHdatabase
--label MODElabel
--idle-threshold N[idle] threshold
--idle-grace N[idle] grace
--idle-advisory[idle] advisory_only

Environment

VariableUsed for
SNAG_URL, SNAG_TOKENwhen both are set, the capture box uses them instead of the stored token
XDG_CONFIG_HOME, XDG_DATA_HOME, XDG_RUNTIME_DIRwhere the config, database and runtime files go
RUST_LOGlog detail, for example RUST_LOG=debug snag run

Next: Keyboard shortcuts