@firstpick/pi-extension-reverse-last
Session-aware undo for Pi write/edit tool changes via /reverse-last.
Package details
Install @firstpick/pi-extension-reverse-last from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@firstpick/pi-extension-reverse-last- Package
@firstpick/pi-extension-reverse-last- Version
0.1.1- Published
- May 3, 2026
- Downloads
- not available
- Author
- firstpick
- License
- MIT
- Types
- extension
- Size
- 8.9 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"./index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-extension-reverse-last
Session-local undo for Pi write and edit file changes.
What it does
- Captures pre-change file snapshots for successful
write/edittool calls. - Maintains a per-session undo stack.
- Restores one or multiple recent changes with a command.
Install
pi install npm:@firstpick/pi-extension-reverse-last
Configuration
PI_REVERSE_LAST_STATE_DIR(optional)- Override undo state storage directory.
- Accepts absolute paths or home-relative paths.
- Default:
~/.pi/agent/state/reverse-last
Commands
/reverse-last [count]— undo last successful file changes in current session.
Tools
None.