A custom footer extension for pi. It replaces Pi's true bottom footer with a compact personal statusline.
Current footer:
🤖 GPT 5.5 | 🕰️ 7m 5s | 💰 $0.00 | 📈 1% [4h 58m] | 📅 13% [Sat 7:26PM] | 🧠 ░░░░░░░░░░ 0% (0k/272k) | 🌿 main | 📁 my-project
Experimental but usable. The footer shows model, session duration, cost, context usage, git branch, and project name. Codex quota windows are shown only when the current model uses the OpenAI Codex provider.
- True bottom footer using
ctx.ui.setFooter(...) - Friendly model label such as
🤖 GPT 5.5 - Session duration shown directly after the model:
🕰️ 11s - Session cost from successful assistant turns:
💰 $0.09 - Codex quota windows for 5-hour and weekly limits, shown only when the current model uses the OpenAI Codex provider:
📈 0% [4h 54m] | 📅 31% [Tue 7:00PM] - Context bar with pressure colors at 65% and 75%:
🧠 █░░░░░░░░░ 14% (28k/200k) - Git branch and project basename when available:
🌿 master | 📁 my-project - Width-aware rendering that drops lower-priority segments before truncating
- Toggle command with
/statusline
pi install git:github.com/skydiver/pi-statuslineTo try it for one session without installing:
pi -e git:github.com/skydiver/pi-statuslineFrom this directory:
pi -e ./src/index.tsThis loads the TypeScript source extension for that Pi session only. Restart Pi after changing extension code.
From a local clone, use:
pi install /absolute/path/to/pi-statuslineOr try it for one session:
pi -e /absolute/path/to/pi-statuslineThen restart Pi, or run /reload inside Pi.
Toggles the custom footer on or off. When disabled, Pi's default footer is restored.
- The extension does not write statusline data to disk.
- For Codex quota windows, it reads Pi's local Codex auth entry from
~/.pi/agent/auth.jsonand sends that bearer token only tohttps://chatgpt.com/backend-api/wham/usage. - Quota responses are kept in memory for a short cache window and are not logged by this extension.
Run checks:
npm test
npm run typecheck
npm run lintsrc/index.ts # Pi extension entry point and command registration
src/footer.ts # Footer layout and width-aware rendering
src/status-modules.ts # Context, duration, git, and project helpers
src/codex-usage.ts # Codex quota window fetch/format helpers
tests/ # Node test runner tests
tsconfig.json # TypeScript build configuration
Possible next additions:
- Pi version/extension status when useful in the footer
- Configurable templates and conditional groups
- Git dirty/status indicators