A Pi extension for when the last answer made you think: “bro, what?”
/bro opens a separate, scrollable overlay and re-explains the relevant conversation context in plain language. The side session has no tools, does not alter the main conversation, and keeps exact facts such as paths, commands, filenames, numbers, URLs, names, statuses, and decisions.
- Re-explains the latest substantive assistant response by default
- Accepts a scope or focus, such as
last 3,the plan, orthe errors - Streams the answer into a dedicated overlay
- Uses a separate model and in-memory side session
- Preserves the source language
- Provides keyboard and mouse scrolling
Review the source before installing; Pi extensions execute with your user permissions.
pi install git:github.com/ygncode/pi-broThen restart Pi or run /reload.
The unscoped npm package
pi-brobelongs to another project. Install this extension from the GitHub URL above.
To try it without installing:
pi -e git:github.com/ygncode/pi-bro/bro
/bro last 3
/bro explain the overall session
/bro summarize the plan
/bro focus on the errors
With no arguments, /bro re-explains the most recent substantive assistant message. The /bro request itself is excluded from conversation counts such as last 3.
The default side-session model is:
opencode-go/deepseek-v4-pro
View or change it with:
/bro model
/bro model provider/model-id
The selected model must already be available and authenticated in Pi. The setting is stored in ~/.pi/agent/bro.json (or the active Pi agent directory).
| Key | Action |
|---|---|
↑ / ↓, j / k |
Scroll one line |
PgUp / PgDn |
Scroll one page |
Home / End |
Jump to start/end |
| Mouse wheel | Scroll |
Enter / Esc |
Close |
Closing while generation is in progress cancels the side session.
The extension builds the active main-session context, starts an in-memory AgentSession with no tools, and sends the selected model a strict plain-language system prompt. The generated explanation is displayed in an overlay and is not appended to the main conversation.
Requires Node.js and npm.
npm install
npm run checkFor a local Pi smoke test:
pi -e ./index.ts