Install
Install with PiG
pig install npm:@agnishc/edb-quit-summaryInstall with Pi
pi install npm:@agnishc/edb-quit-summaryPackages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.
Pi manifest JSON
The pi field of package.json.
{
"extensions": [
"./src/index.ts"
]
}README
Written by the package's publisher, shown as published in version 0.21.1 (README.md). PiG does not review it.
edb-quit-summary
A pi extension that prints a session summary to your terminal when you quit pi.
When you hit /quit (or Ctrl+C twice), pi exits and you'll see a compact summary like:
Session Summary / quit
─────────────────────────────────────────────────────
/\_/\ Session Refactor auth module
< ▓ ▓ > Duration 23m 45s
\___/ Model anthropic/claude-sonnet-4-5
Messages 8 user / 8 assistant
Tools 24 · edit 12× · bash 6× · read 4×
Tokens 101.4k total 45.2k in 12.8k out
Cost $0.34
How It Works
Pi uses an alternate screen buffer for its TUI. When pi exits, the terminal restores the original buffer, wiping anything printed during the session. This extension works around that by:
- Collecting stats on the
session_shutdownevent (whenreason === "quit") - Registering a
process.on('exit')callback that fires after the TUI is torn down - Writing the formatted summary directly to
process.stdout
Installation
As a pi package (recommended)
pi install npm:@agnishc/edb-quit-summary
Manual
Copy src/index.ts to ~/.pi/agent/extensions/quit-summary.ts.
Configuration
No configuration needed — it just works. The summary only prints on quit, not on /new, /resume, /fork, or /reload.