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" }
  ]
}

Reference

Block types

TypeShows
valueOne figure, coloured against its own history
progressA bar toward a total, with optional eta_min and ticks
chartA line of y against x, with optional markers
tableRows from a list. Columns can use fmt (mmss, k, badge), fig and cls. Optional actions
logThe latest lines or events. colors maps a regex to a state (best, good, warn, bad, run)
sessionsCoding 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
webappA 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
clipA crop of one element on a web page: live for local pages, a snapshot (scripts off) for online ones
pageAny web page, live, unless the site blocks embedding (then an Open button)
linksLinks you open often: resume, docs, dashboards
timer, counter, checklistLocal 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.

AgentConfig fileEvents to hookCommand
Claude Code~/.claude/settings.jsonSessionStart, UserPromptSubmit, PreToolUse, PostToolUse, PermissionRequest, Notification, Stop, SessionEndspotter hook claude-code
Codex~/.codex/hooks.jsonSessionStart, UserPromptSubmit, PreToolUse, PostToolUse, PermissionRequest, Stop, SessionEndspotter hook codex
Gemini CLI~/.gemini/settings.jsonSessionStart, BeforeAgent, BeforeTool, AfterTool, AfterAgent, SessionEndspotter hook gemini-cli
Cursor~/.cursor/hooks.jsonsessionStart, beforeSubmitPrompt, preToolUse, postToolUse, stop, sessionEndspotter hook cursor
Copilot CLI~/.copilot/hooks/spotter.jsonsessionStart, userPromptSubmitted, preToolUse, postToolUse, notification, agentStop, sessionEndspotter 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.