scratch · the session-scoped scratchpad
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.
$ scratch ───────────────────────────────────────────── - repro: POST /users w/ empty body → 500 - check createdAt default in migration 0042 - ask about the rate-limit header naming ───────────────────────────────────────────── saved · ^x clear · ^q quit
what it's scoped to
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
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.
| Key | Action |
|---|---|
| type | edit — the buffer autosaves a moment after you stop |
^x | clear the whole pad (confirm with y) |
^q / esc | flush and quit |
for agents
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
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.