9c88e0a003d87892785b889cd36dc3bf022d2eb5
pi-statusbar
A pi extension that replaces the built-in footer with a configurable two-row statusbar.
Features
- Directory, git branch, session, context, model, thinking, and cost modules
- Account usage modules for Claude/Anthropic, Codex/ChatGPT, and Z.ai
- Configurable rows and module placement in
config.ts - ANSI-aware rendering and truncation for narrow terminals
- Continuous green → yellow → red usage bar gradient
Usage
Add this extension to pi via package.json:
{
"pi": {
"extensions": ["./index.ts"]
}
}
Reload pi after changes with /reload.
Refresh account usage manually with:
/refresh-usage
Configuration
Edit config.ts to change the statusbar layout. Usage modules can be composed with options such as:
{ type: "usage", window: "current", style: "line", grow: 1 }
{ type: "usage", window: "week", style: "text", parts: ["percent", "time"] }
Development
npm install
npm run lint
npm run typecheck
Attribution
Provider usage fetchers in usage/ are adapted from oh-my-pi.
Description
Languages
TypeScript
99.1%
Nix
0.9%