Install
Install with PiG
pig install npm:@harrarz/pi-compact-footerInstall with Pi
pi install npm:@harrarz/pi-compact-footerPackages 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": [
"./src/index.ts"
]
}README
Written by the package's publisher, shown as published in version 0.1.0 (README.md). PiG does not review it.
Pi Compact Footer
A single-line Pi status bar: directory/branch, Git changes, context usage, model/thinking level, elapsed work, cache hits, and optional provider quota.
Install
Requires Node.js ≥22.19 and Pi ≥1.5.
pi install npm:@harrarz/pi-compact-footer
Disable/remove an older local footer before loading this package; only one extension can own Pi's footer.
Use
/bottombar— configure the bar; preferences survive restarts./quota [codex|claude|custom-id]— fetch quota once, even when polling is off./codex-week//claude-week— fetch weekly quota once.
Background quota requests are off by default. Enable them in /bottombar → Usage; only the active provider is polled, at most once per five minutes. Percentages show quota remaining, not used. Failed refreshes mark retained values as stale.
Codex uses Pi's Codex OAuth login. Claude uses Pi's Anthropic OAuth login; API keys do not provide subscription quota. Separately enable Read Claude Code credentials to allow a read-only fallback to its selected credential file or macOS Keychain. This never refreshes or modifies Claude Code credentials. Keychain access may prompt for OS permission.
These are undocumented provider endpoints and may change. Quota requests never send a model prompt or perform a paid inference probe. Credentials/quota are not written to preferences or logs. See authentication and privacy.
Architecture
Pi events + session/model data ─┐
Git CLI ───────────────────────┼→ in-memory state → compact footer
Codex / Claude / custom ───────┘ ↑
quota adapters /bottombar
↑ private preferences
opt-in poll or /quota
TypeScript + Node.js + Pi's TUI. Add your own quota adapter without editing the footer.
Development
npm ci
npm run check # types, credential-free tests, tarball checks
npm run test:tui # real terminals; no quota or inference requests
pi -e ./src/index.ts # one-off trial; does not change Pi settings
Preferences: $PI_CODING_AGENT_DIR/compact-footer/settings.json, otherwise ~/.pi/agent/compact-footer/settings.json (private file, no project config). Git line counts cover tracked changes; untracked paths contribute to the file count only.