pi-git-status-bar

Pi extension showing live git status (dirty files, staged, ahead/behind, session commits) in the footer status bar.

Packages

Package details

extension

Install pi-git-status-bar from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-git-status-bar
Package
pi-git-status-bar
Version
0.1.3
Published
Aug 2, 2026
Downloads
512/mo · 51/wk
Author
anh-chu
License
MIT
Types
extension
Size
9.4 KB
Dependencies
0 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./src/index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-git-status-bar

Pi extension that shows live git status for the current project in the footer status bar: dirty files, staged/unstaged/untracked counts, new dirty files introduced during the session, ahead/behind vs. origin, and commits made in the current session.

Install

pi install npm:pi-git-status-bar

Or try without installing:

pi -e npm:pi-git-status-bar

What it shows

The status bar entry updates on session start, turn end, and after each bash tool call, plus a 10s background refresh. Example:

⎇ staged:1 unstaged:2 untracked:1 new:2 ↑1 commits:1
  • — git indicator (replaces the word "git")
  • staged:N / unstaged:N / untracked:N — current git status --porcelain=v2 counts
  • new:N — files that became dirty since the session started (not dirty at session start)
  • ↑N / ↓N — commits ahead/behind the upstream branch
  • commits:N — commits made on this branch since the session started
  • ✓ clean — no dirty files and in sync with upstream
  • pushed — no ahead/behind divergence, upstream configured
  • no upstream — branch has no tracking upstream

Not a git repository: the status entry is cleared.

How it works

Uses git status --porcelain=v2 --branch, git rev-parse HEAD, and git rev-list --count via pi.exec, scoped to the session's working directory. No state persists outside the running session; each new session recomputes its own dirty-file baseline and start commit.

Requirements

  • git available on PATH
  • pi >=0.70 (uses ctx.ui.setStatus)

License

MIT