↑ subaud · local-first · MIT  

scratch · the session-scoped scratchpad

The notes pane of every workspace.

scratch opens a scratchpad for the thing you'll need in ten minutes — a URL, a stack trace, the plan for the next commit — without leaving the terminal or leaving a stray file in your repo. It's the scratch pane in a proj sidebar, and it stands alone anywhere you run it.

what it's scoped to

One pad per session, not per repo.

A scratchpad is only useful if the right notes are in front of you. scratch keys each pad to your session, most-specific first: the coding-agent session it runs in, else the tmux session, else the working directory. Two agents working the same repo get two pads; the same session always returns to its own.

The file lives under your config directory (~/.config/scratch/pads/ on Linux, the equivalent on macOS and Windows) — never in the repo, so it can't be committed by accident or clutter git status. Point it elsewhere with SCRATCH_DIR, or pin one exact file with SCRATCH_FILE.

the pad

Type. It saves itself.

scratch is a plain text pad with no modes and nothing to remember. It autosaves as you type (debounced), reloads if the file changes underneath it, and flushes on the way out — so notes are never lost to a forgotten save.

KeyAction
typeedit — the buffer autosaves a moment after you stop
^xclear the whole pad (confirm with y)
^q / escflush and quit

for agents

The same pad, from the command line.

Because the pad is keyed to the session, a coding agent shelling out lands on the same pad the human TUI shows — no path to pass, no coordination. Three subcommands make it scriptable.

$ scratch append "TODO: back-fill createdAt before deploy"
$ scratch print        # the pad's contents
$ scratch path         # where this session's pad lives

An agent can jot a reminder to itself, or read back what it left last turn, and you see it appear in the open scratch pane — one shared surface between you and the agent in the session.

install

Install scratch, run it.

One command downloads scratch, verifies its checksum, and puts it on your PATH (~/.local/bin). macOS and Linux, Apple silicon and x86-64.

$ curl -fsSL https://tackle.tools/install.sh | sh -s scratch

# then
$ scratch

Run it again to upgrade; check your version with scratch version. Building from source instead? go install github.com/schuettc/tackle/cmd/scratch@latest.