Skip to content

About

A sidebar for Pi coding harness

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

Repository files navigation

Pi mkaz Status Bar

A compact, two-line footer for Pi. The package keeps its original name, pi-mkaz-sidebar, but no longer draws a sidebar.

  • Workspace: ticket, branch, lines added/removed, and Git status (clean, staged, unstaged, untracked, or CONFLICT).
  • Session: activity, model/provider, thinking level, context percentage, task progress, recipe status, and other extensions' status text.

Long lines are truncated to the terminal width. No file list, borders, side padding, overlays, mouse handling, or renderer/layout patches. Pi keeps the full terminal width for conversation text and selection.

Install locally

Clone the repo, install dependencies, and launch Pi with the extension:

git clone https://github.com/mkaz/pi-mkaz-sidebar
cd pi-mkaz-sidebar
npm install
pi -e .

To load it in all sessions:

ln -s /DIR/TO/SRC/pi-mkaz-sidebar ~/.pi/agent/extensions

Typecheck with npm run check. After editing the extension, use /reload. When upgrading from the sidebar version, restart Pi if old side padding remains.

Commands

/statusbar [on|off]               # toggle the footer; off restores Pi's footer
/sidebar [on|off|enable|disable]  # compatibility alias for /statusbar
/ticket                          # open the current ticket in your browser
/ticket status                   # show the detected ID and URL
/ticket <ID|URL>                  # pin a ticket for this session
/ticket auto                      # return to automatic detection
/pr                              # open the current branch's GitHub PR
/pr status                       # show PR number, title, state, and URL
/just [recipe [arguments...]]
/just --stop|--restart|--status

/pr requires a trusted project and an installed, authenticated GitHub CLI. PR data is fetched only when you run the command.

Current ticket

The footer shows a ticket when the extension can identify one locally. It prefers a pinned ticket, then the latest user message containing a single ticket reference, the session name, and the Git branch (for example mkaz/FAM-1234-fix). Messages without a ticket reference leave the previous ticket selected. As a fallback, it uses ticket links in the conversation when they identify only one ticket.

  • Linear and Jira: IDs such as FAM-1234 work regardless of phrasing: “work on FAM-1234,” “this fixes FAM-1234,” or “Linear ticket FAM-1234.”
  • GitHub: Supports issue URLs and owner/repo#123 references. Phrases such as “This change addresses GitHub issue #2,” “fix issue #2,” and “work on #2” use the repository from the Git origin remote. Without a GitHub origin, a single repository identified by GitHub issue links or qualified references in the conversation supplies the context.

If “GitHub issue #2” has no repository context, the footer still shows GitHub #2, but opening it requires a URL. Bare numbers alone are not treated as tickets. Detection uses local pattern matching, not a skill or an additional model request.

/ticket (or /ticket open) opens the ticket in your default browser. The URL must be a Linear issue, Jira /browse/, or GitHub issue link found in the active session history or supplied with /ticket <URL>. Qualified GitHub references supply their own browser URL (for example /ticket mkaz/pi-mkaz-sidebar#123); it does not guess workspace domains or fetch ticket metadata. If only an ID is known, the command asks for its URL. Pinned tickets survive reloads and compaction, and follow the active session branch. /ticket auto removes the pin.

Justfile recipes

For a trusted project with a justfile (also .justfile, Justfile, or .Justfile) and just installed:

/just test
/just run --port 3000

Recipes run from Pi's working directory. The footer shows the command and status; /just --status shows the last three non-empty output lines. Output does not trigger footer repaints. Use /just --stop to stop a recipe or /just --restart to rerun it. Pi stops running recipes on shutdown.

Justfiles are read at session start. After adding or changing one, use /reload.

Tasks and settings

The optional todo tool supports create, update, list, get, delete, and clear, with pending, in_progress, and completed states. The footer shows completed/total counts; tool results contain task details. Snapshots follow session branches and survive reloads and compaction.

Edit settings.json and run /reload:

{
  "todo": true,
  "usage": false
}

todo: false omits the task tool and count. usage: true adds session cost when available for non-subscription models. Context percentage is always shown when available. Missing settings default to true; invalid settings use defaults and print a warning.

Performance and privacy

The footer uses Pi's public setFooter API. There is no animation timer or streaming token estimation. Git refreshes are debounced, rate-limited to at most one start every three seconds during normal event-driven updates, and never awaited between model turns. Concurrent inspections share one request. There is no idle polling.

Git inspection reads branch, status, tracked line changes against HEAD, and the origin remote for ticket context. It does not read untracked file contents or collect file modification times. Line totals exclude untracked files and binary contents; untracked changes still appear in the status. Failed inspections retain the last summary marked stale.

The extension makes no telemetry or automatic network requests. /pr explicitly contacts GitHub; just recipes may make their own connections. Ticket detection uses local pattern matching over session history, not a model or remote lookup. Ticket pins and task snapshots stay in Pi's session history. Ticket URLs open only on an explicit command.

License

MIT

Inspired by pi-atelier extension.

About

A sidebar for Pi coding harness

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages