@firstpick/pi-extension-reverse-last

Session-aware undo for Pi write/edit tool changes via /reverse-last.

Package details

extension

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.2
Published
May 5, 2026
Downloads
201/mo · 201/wk
Author
firstpick
License
MIT
Types
extension
Size
8.9 KB
Dependencies
1 dependency · 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/edit tool 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.