@giladbarnea/pi-custom-footer

Context, cache, cost, and loaded skills at a glance in Pi.

Packages

Package details

extension

Install @giladbarnea/pi-custom-footer from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@giladbarnea/pi-custom-footer
Package
@giladbarnea/pi-custom-footer
Version
0.1.3
Published
Oct 7, 2026
Downloads
244/mo · 201/wk
Author
giladbarnea
License
MIT
Types
extension
Size
42.6 KB
Dependencies
0 dependencies · 3 peers
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ]
}

Security note

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

README

Custom Footer

Know how much context remains. See what each turn costs.

pi extension npm license

A Pi footer that puts your session’s context, cache usage, cost, and loaded skills around the editor.

pi install npm:@giladbarnea/pi-custom-footer

Above the editor, see your model, thinking level, session name and ID. Loaded skills get their own row, with token ages.

Below the editor, see:

  • Context remaining at a glance: a color-graded gauge and used/window tokens.
  • Cost across the conversation: cumulative cost and average cost per assistant turn.
  • Cache behavior: session hit rate, latest hit or estimated miss, and reused/new token totals.
  • Where you are: Git branch, dirty marker, directory, and other extensions’ status messages.

The layout follows your Pi theme. The header and the footer each take the fewest lines they can. To fit, they first drop labels, round readings, remove whitespace, and drop the branch icon. Only then does the footer hide facts: the reused/new split, the session hit rate, the token counts, and last the cost per turn.

On terminals with 40 rows or fewer, skills get at most four rows. To fit, the row first drops token ages, then separators, then shortens long names in the middle (caut…ctor). Only then does it show three rows plus a hidden-skill count.

Resize without rescanning the conversation. The header and footer share cached values. Session changes refresh them, including forks and compaction.

Skill age measures context-token growth since the first response after a skill load. A cache miss compares consecutive prompt sizes with reported reuse. Costs use the model’s reported pricing, including when you use a subscription.

Development

npm ci
npm test
npm run check

Tests cover rendered values, skill tracking, cache reuse, session changes, and forks. They make no model calls.