A fast, keyboard-first TUI for one per-worktree markdown scratchpad:
$PWD/.scratch.md. Autosaves, reloads external edits non-destructively, and
stays out of your way.
go install github.com/schuettc/scratch@latestscratch # open the TUI editor on ./.scratch.md
scratch print # print the file to stdout
scratch append "…" # atomically append a line (for hooks/scripts)
scratch path # print the resolved file pathKeys: type to edit · ctrl+s save · ctrl+r reload from disk · ctrl+x clear (asks y/n) · ctrl+q/esc quit.
Autosave runs ~500ms after you stop typing, on quit, and on ctrl+s.
- In a dir with no
.scratch.md: runscratch, type, wait ~1s, quit;cat .scratch.mdshows your text. - With the TUI open and idle (clean), run
scratch append "x"in another shell → the line appears live in the editor. - Type locally (don't save), then
scratch append "y"elsewhere → header shows● changed on disk; your edits are intact;ctrl+rloads the disk version. - Quit with unsaved edits (
ctrl+q) → they're flushed to disk.