pi-chao-toolkit
v0.2.0
Published
Chao's pi coding agent extensions bundle: session tree view, git auto-checkpoints, auto-retry, computer use, and more
Readme
pi-chao-toolkit
All-in-one pi coding agent extensions bundle. One install, everything works:
pi install npm:pi-chao-toolkitWhat's inside
| Extension | What it does |
|---|---|
| tree-graph (/tg, /tree-graph) | Time-ordered session tree (newest on top), branch tracks, ×N merged repeats, git snapshot badges, g restores code |
| git-checkpoint (/checkpoints, /checkpoint-restore, /checkpoint-prune) | Auto git snapshots before every write/edit + on session start, stored in shadow repos (your project's .git untouched) |
| auto-retry (/retry, /watchdog-stats) | Automatic retry on transient model errors (429, stream stalls, no first token), with trigger stats |
| force-steer | ctrl+enter / ctrl+r steering shortcuts (note: ctrl+r overrides the built-in session-rename shortcut) |
| ai-progress | Session progress tracking UI |
| rtk / ttft | Time-to-first-token and latency stats in the status bar |
Requirements
giton PATH (for git-checkpoint).- Snapshots cover projects under
~/code/(first-level directory = project root) plus~/.pi/agent. - ai-progress notifications/SwiftBar status are macOS-enhanced; on other platforms it degrades to status files only.
Snapshot retention (env vars)
| Var | Default | Meaning |
|---|---|---|
| PI_CHECKPOINT_RETENTION_DAYS | 30 | Only prune commits older than this |
| PI_CHECKPOINT_MIN_KEEP | 50 | Always keep the newest N commits |
| PI_CHECKPOINT_HARD_CAP | 1000 | Hard cap on total snapshots |
| PI_CHECKPOINT_PRUNE | 1 | 0 disables auto-prune (/checkpoint-prune still works) |
| PI_WATCHDOG_LOG | ~/.pi/agent/auto-retry-watchdog.log | Where auto-retry writes trigger stats |
Excluded from snapshots: node_modules, dist, build, __pycache__, .venv, *.log, etc.
Troubleshooting
Slash commands sent as plain messages: another copy of these extensions is loading
at the same time (e.g. dev files under ~/.pi/agent/extensions/ plus this package).
Duplicate command registration disables both copies — keep only one
(pi remove npm:pi-chao-toolkit or delete the dev files).
License
MIT
