Skip to content

About

Custom compact statusline footer for pi.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

pi-statusline

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

Status

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.

Features

  • 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

Install

From git

pi install git:github.com/skydiver/pi-statusline

To try it for one session without installing:

pi -e git:github.com/skydiver/pi-statusline

Run locally

From this directory:

pi -e ./src/index.ts

This loads the TypeScript source extension for that Pi session only. Restart Pi after changing extension code.

Install from a local checkout

From a local clone, use:

pi install /absolute/path/to/pi-statusline

Or try it for one session:

pi -e /absolute/path/to/pi-statusline

Then restart Pi, or run /reload inside Pi.

Commands

/statusline

Toggles the custom footer on or off. When disabled, Pi's default footer is restored.

Privacy notes

  • 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.json and sends that bearer token only to https://chatgpt.com/backend-api/wham/usage.
  • Quota responses are kept in memory for a short cache window and are not logged by this extension.

Development

Run checks:

npm test
npm run typecheck
npm run lint

Project layout

src/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

Roadmap

Possible next additions:

  • Pi version/extension status when useful in the footer
  • Configurable templates and conditional groups
  • Git dirty/status indicators

About

Custom compact statusline footer for pi.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages