Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pi-bro

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.

Features

  • Re-explains the latest substantive assistant response by default
  • Accepts a scope or focus, such as last 3, the plan, or the 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

Install

Review the source before installing; Pi extensions execute with your user permissions.

pi install git:github.com/ygncode/pi-bro

Then restart Pi or run /reload.

The unscoped npm package pi-bro belongs to another project. Install this extension from the GitHub URL above.

To try it without installing:

pi -e git:github.com/ygncode/pi-bro

Usage

/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.

Model configuration

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).

Overlay controls

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.

How it works

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.

Development

Requires Node.js and npm.

npm install
npm run check

For a local Pi smoke test:

pi -e ./index.ts

License

MIT

About

Plain-language side-channel explanations for Pi conversations

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages