Spotter files
Each spotter is one JSON file in ~/.config/spotter/spotters/<id>.json (set SPOTTER_DIR to use another folder). Edit it by hand, in the built-in editor, or ask your coding agent to: Spotter notices the change within a second, applies it and flashes what moved. A file with an error shows File error and keeps its last good version until it is fixed. Removing a spotter moves its file to .trash/ in the same folder.
Setup
settings.json
settings.json, next to the spotters folder, holds the bar order (which also decides ⌥1–⌥9), the switcher shortcut, quiet hours, the app theme, how often sources are checked (a source's own every wins) and whether the Spotter icon shows in the bar:
{
"order": ["training", "claude"],
"switcher": "option+space",
"quiet_hours": "22:00-07:00",
"theme": "native",
"every": "5s",
"show_icon": true
}
It also holds slots (false turns off ⌥1–⌥9). The Settings tabs in the Spotter window write all of these. Themes are native, instrument, editorial, glass, terminal, swiss, soft and quiet; they restyle the popovers, the switcher and the Spotter window, never the menu bar.
Format
The file
{
"name": "Training run",
"look": { "theme": "system", "figures": "plain", "accent": "#0a84ff" },
"sources": { "run": { "url": "http://127.0.0.1:8790/data", "every": "5s" } },
"status": { "alive": "alive", "age": "log_age_s", "stale_after": "10m" },
"bar": { "blocks": ["progress", "mrr"], "icon": "chart" },
"blocks": [
{ "id": "progress", "type": "progress", "value": "losses[-1][0]", "total": "= d.run.epochs * d.run.train_groups" },
{ "id": "mrr", "type": "value", "title": "MRR", "history": "evals[*][2]", "better": "higher", "baseline": "evals[0][2]" },
{ "id": "tower", "type": "clip", "page": "http://127.0.0.1:8790/", "selector": "#tower" }
]
}
- hotkey: an optional shortcut that opens this spotter from anywhere, written like
"option+shift+t"(cmd,option,control,shift, then one key). Every spotter also opens with⌥1–⌥9by its place in the bar (turn this off in Settings › Shortcuts if your keyboard types characters with ⌥ and a digit), and⌥Spaceopens the quick switcher. - bar: what the menu bar item shows.
blocksare the pinned blocks' values,badgea count (like unread chats),labela word,alertan expression that raises "Needs you", andiconthe bar icon: an icon name such as"bell","none"for no icon, or left out to use the spotter'sicon. With no icon and nothing pinned, the item shows the spotter's name, so it never disappears. Pick the icon in Edit › Look. - look: the theme, figure style (
flaporplain) and accent colour for this spotter only. When it's left out, the default look applies. - sources: URLs polled on an interval. They can be local (
http://127.0.0.1:…) or online (https://…). - status: decides the status word (Live, Stale, Stopped, Offline) and the dot on the bar item.
- alerts: rules that make the bar item call (a small hop, a tint, a short word) and, if you ask, show a banner. Each rule watches one value and fires when it changes, never for something already true at start:
{"when": "losses[-1][1]", "above": 2, "for": "2m", "say": "Loss {value}"}. Conditions:above,below,is,changes,offline,needs_you. Optional:for(how long it must hold),quiet(gap before it can fire again, 10 min by default),show(peek,quietfor a tint only, orbanner),tone(good,warn,bad,run). Duringquiet_hoursin settings.json alerts only tint. - Values are paths such as
evals[-1][2]orsessions[*].status, or JavaScript expressions starting with=. In an expression,dis the source data andris a table row.
Reference
Block types
| Type | Shows |
|---|---|
value | One figure, coloured against its own history |
progress | A bar toward a total, with optional eta_min and ticks |
chart | A line of y against x, with optional markers |
table | Rows from a list. Columns can use fmt (mmss, k, badge), fig and cls. Optional actions |
log | The latest lines or events. colors maps a regex to a state (best, good, warn, bad, run) |
sessions | Coding agent sessions: Needs you with Deny, Always allow and Allow; Working, expandable; Recent. Rows use project, branch, model, status, tool, action, ask, cmd, todo, tasks_done, context_pct, added, removed |
webapp | A web app the Mac app hosts, like WhatsApp Web: unread chats and previews from its own notifications. States: linked, previews off, not linked, logged out |
clip | A crop of one element on a web page: live for local pages, a snapshot (scripts off) for online ones |
page | Any web page, live, unless the site blocks embedding (then an Open button) |
links | Links you open often: resume, docs, dashboards |
timer, counter, checklist | Local state, no source needed |
Native app
Background jobs
spotter run starts a command in the background so it outlives the shell (or coding agent) that started it, and keeps ~/.config/spotter/jobs/<id>.json current: name, command, folder, status (running, done, failed, stopped, lost), exit, started, ended, url, tail (the last log lines) and seen, a heartbeat the supervisor rewrites every 5 s while the job runs. One rule for every reader: a running or starting job whose seen is over 15 s old, or missing, is lost (its supervisor is gone, after a restart say). Nothing writes "lost"; spotter jobs, the Jobs spotter and the MCP all work it out the same way.
spotter run --name "Dev server" --url http://localhost:3000 -- npm run dev
spotter jobs
spotter stop dev-server
A file:// source that names a folder reads every *.json in it as a list (each with its file name as _id), so one spotter shows every job. A ready-made one, with a banner when a job fails: jobs.json.
Native app
Coding agents
spotter hook AGENT is one hook for every agent below. Each event updates ~/.config/spotter/agents/<agent>-<session>.json (readable only by you): agent, project, status (idle, working, needs_you, done), a short action ("Running npm test", "Editing list.ts"), files edited, and for a permission request what it asks to run (first 160 characters). Prompts, tool output and file contents are never written. Sessions untouched for a day are removed.
| Agent | Config file | Events to hook | Command |
|---|---|---|---|
| Claude Code | ~/.claude/settings.json | SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, PermissionRequest, Notification, Stop, SessionEnd | spotter hook claude-code |
| Codex | ~/.codex/hooks.json | SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, PermissionRequest, Stop, SessionEnd | spotter hook codex |
| Gemini CLI | ~/.gemini/settings.json | SessionStart, BeforeAgent, BeforeTool, AfterTool, AfterAgent, SessionEnd | spotter hook gemini-cli |
| Cursor | ~/.cursor/hooks.json | sessionStart, beforeSubmitPrompt, preToolUse, postToolUse, stop, sessionEnd | spotter hook cursor |
| Copilot CLI | ~/.copilot/hooks/spotter.json | sessionStart, userPromptSubmitted, preToolUse, postToolUse, notification, agentStop, sessionEnd | spotter hook copilot-cli EVENT |
Claude Code, Codex and Gemini CLI use the same shape (one entry per event):
{"hooks": {"PreToolUse": [{"hooks": [{"type": "command", "command": "spotter hook claude-code"}]}]}}
Cursor:
{"version": 1, "hooks": {"preToolUse": [{"command": "spotter hook cursor"}]}}
Copilot CLI names the event on the command line:
{"version": 1, "hooks": {"preToolUse": [{"type": "command", "bash": "spotter hook copilot-cli preToolUse"}]}}
Reference
States
A block can compare a figure with its own history and mark it as best, better, worse or failing. How each state looks comes from the spotter's theme.