A pi package for scratchpad — organize agent knowledge into scratchpads (a folder + scratchpad.json manifest) with a read-only visual viewer.
It ships:
- Skills —
scratch(the CLI loop:new→ write →add→ls→show) andplanning-with-scratchpad(planning conventions on top). These teach the pi agent when and how to drive the CLI. - Commands — the bits a plain shell call can't do well:
/scratch ui [pad] [--browser]— open the viewer. The viewer is long-running, so it's launched detached. No pad → interactive picker; type a pad → tab-completion./scratch export [pad] [-o <file>] [--offline] [--theme <id>] [--mode dark|light|system]— write the standalone HTML and report the path. Same pad selection asui.--theme/--modepin the exported page's appearance for every reader./scratch stop— close viewers opened this session.
The scratch CLI must be on your PATH (it runs on Bun):
bun add -g @nikiforovall/scratchpadThe commands and skills surface this hint if the CLI is missing.
pi install npm:@nikiforovall/pi-scratchpadOr, for local development, add the package directory to ~/.pi/agent/settings.json:
{ "packages": ["~\\dev\\scratchpad\\pi"] }