@accolver/pi-status-bar
Theme-aware Pi status bar extension with git state and AI-generated session titles.
Package details
Install @accolver/pi-status-bar from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@accolver/pi-status-bar- Package
@accolver/pi-status-bar- Version
0.1.2- Published
- Oct 3, 2026
- Downloads
- 258/mo · 197/wk
- Author
- accolver
- License
- MIT
- Types
- extension
- Size
- 30.3 KB
- Dependencies
- 0 dependencies · 3 peers
Pi manifest JSON
{
"extensions": [
"./extensions/status-bar.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-status-bar
A small Pi extension that replaces the default TUI footer with a theme-aware status bar showing git state and an AI-generated session summary.
Features
- Sticky footer for Pi's interactive TUI.
- Current working folder, git branch (or linked worktree name), GitHub PR number when available, git worktree marker, and pending change counts.
- AI-generated session title, refreshed as the conversation evolves.
- Graceful fallback session title when model auth or title generation is unavailable.
- Manual session title override with
ctrl+shift+ror/session-bar-title. - Resume-friendly session names via
pi.setSessionName(...). - Theme-aware colors using Pi theme tokens, grapheme-safe truncation and a width-safe row for other extensions' statuses.
- Branch assistant-only input/output token counters (not total session usage or billing).
- No background timers in RPC, JSON or print mode.
Version 0.1.2 is tested against Pi 1.0.0. Host packages remain optional wildcard peers supplied by Pi; they are never bundled with this extension.
Install
From npm:
pi install npm:@accolver/pi-status-bar
Or install directly from GitHub:
pi install git:github.com/accolver/pi-status-bar
After install, restart Pi or run:
/reload
Commands
/session-bar-title
Set the session title manually. Once set, AI title refreshes stop overwriting it.
/session-bar-clear-title
Clear a manually set session title and resume AI title updates.
/session-bar-refresh
Force-refresh git state and the AI session summary. Manual titles are preserved.
/session-bar-toggle
Toggle the status bar for the current session.
Shortcut
Press ctrl+shift+r to enter a manual session title. To change the shortcut, set PI_STATUS_BAR_TITLE_SHORTCUT or edit options.manualTitleShortcut in extensions/status-bar.ts.
How it works
The extension uses Pi's extension APIs:
ctx.ui.setFooter(...)for the sticky TUI footer.pi.exec(...)for read-only git status checks and a cachedgh pr viewlookup. If GitHub CLI is unavailable, unauthenticated, or no PR matches the current branch, the PR marker is simply omitted.ctx.modelRegistry.streamSimple(...).result()with the currently selected Pi model and configured provider routing for short summaries, falling back to a local title if auth/model calls fail.pi.setSessionName(...)so/resumeshows the generated session title.pi.appendEntry(...)to persist summary metadata without adding it to LLM context. Titles restore from the active branch on resume/tree navigation; manual titles cancel pending AI work.
Automatic title generation sends up to 24,000 characters of branch user/assistant text (plus tool-call names) to the selected model's provider. These additional requests can incur cost and are not included in the footer's branch assistant counters. Those counters also exclude abandoned branches, cache tokens, tool/compaction/branch-summary usage and other non-assistant entries. Use a manual title to stop automatic title requests, or toggle the footer off; in-flight requests are cancelled on manual override, toggle, tree/session changes and shutdown.
Package metadata
This repo is packaged for Pi with:
{
"keywords": ["pi-package", "pi-extension"],
"pi": {
"extensions": ["./extensions/status-bar.ts"]
}
}
License
MIT