← Catalog

@accolver/pi-status-bar

Theme-aware Pi status bar extension with git state and AI-generated session titles.

Extension

Install

Install with PiG

pig install npm:@accolver/pi-status-bar

Install with Pi

pi install npm:@accolver/pi-status-bar
Review before installing

Packages 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": [
    "./extensions/status-bar.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 0.1.3 (README.md). PiG does not review it.

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+r or /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.3 is tested against Pi 1.4.0 with controlled fixture providers (including the installed host SDK). 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 cached gh pr view lookup. 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 /resume shows 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