@pi9/context
v0.2.3
Published
Pi extension to show a breakdown of your current context usage.
Downloads
870
Maintainers
Readme
@pi9/context
Pi extension that registers /context — a scrollable breakdown of how your current context window is being used (model, responsive usage graph, compaction reserve, conversation stats, memory files, tools, and skills).

Usage
In an interactive pi session:
/contextThe report opens as an inline custom view in the main UI flow. Scroll with ↑/↓ or j/k, page with PgUp/PgDn or u/d, jump with Home/End, and close with q or Esc (Enter also closes).
In modes without extension UI support, the command shows a short warning only.
Install
pi install npm:@pi9/contextFor local development, load packages/context/src/index.ts as an extension.
Development
npm run typecheck
npm testManual verification
To verify the TUI end-to-end:
- Start pi with this extension in a terminal at least 80 columns wide.
- Run
/contexton a session with several messages so the report exceeds the viewport. - Confirm keyboard scrolling, help text, the responsive graph and displayed per-block token scale, section token totals, and Esc closes the inline view without injecting report text into the chat.
