pi-resume-on-exit
Print a copyable Pi resume command when an interactive Pi session exits.
Package details
Install pi-resume-on-exit from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-resume-on-exit- Package
pi-resume-on-exit- Version
0.1.3- Published
- May 6, 2026
- Downloads
- 47/mo · 6/wk
- Author
- mujuni88
- License
- MIT
- Types
- extension
- Size
- 2.8 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"./extensions/resume-on-exit.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-resume-on-exit
A Pi package that prints a copyable resume command when an interactive Pi session exits via quit.
Behavior
- Listens for Pi
session_shutdownevents. - Prints only for quit shutdowns, including Ctrl+C/Ctrl+D/SIGTERM exits handled by Pi.
- Prefers the active session id when available.
- Falls back to the session file path and shell-quotes it safely.
- Never blocks or throws during shutdown.
Example output:
Resume this Pi session:
pi --session abc123
Install
Public npm package:
pi install npm:pi-resume-on-exit
Source package from GitHub:
pi install git:github.com/mujuni88/pi-resume-on-exit
Development
npm install
npm run check