pi-light-statusline
Lightweight colored statusline for the pi coding agent: official-style layout, icons, live tok/s, cache-hit rate, and optional AI working vibes
Package details
Install pi-light-statusline from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-light-statusline- Package
pi-light-statusline- Version
0.1.4- Published
- Aug 27, 2026
- Downloads
- 758/mo · 25/wk
- Author
- lanlance
- License
- MIT
- Types
- extension
- Size
- 38.5 KB
- Dependencies
- 0 dependencies · 3 peers
Pi manifest JSON
{
"extensions": [
"./extensions/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-light-statusline
A lightweight colored statusline for pi — official layout, your colors, live tok/s & cache-hit rate, and optional AI working vibes.
What Is This
pi's built-in footer is informative but monochrome, and it can't show generation speed. pi-powerline-footer is powerful but heavy — 20+ segments, presets, themes, welcome overlays.
pi-light-statusline is the middle path: the built-in footer's clean layout
(left stats, right-aligned model + thinking level), plus:
- colors & Nerd Font icons for every segment (ASCII terminals degrade to plain text)
tok/s— live output speed of the current assistant message, frozen at its final value- cache-hit rate — prompt cache efficiency of the latest turn
- AI working vibes (optional, off by default) — themed loading messages generated by any model you configure
gists.lanlance.cn main 53k/1.0M (5.3%)
47 tok/s 78% Cache glm-5.3 xhigh
Other extensions' footer statuses (e.g. subagent tooling) keep working: they render on their own line below the statusline, exactly like the built-in footer.
Install
pi install npm:pi-light-statusline
or via git:
pi install git:https://github.com/L2ncE/pi-light-statusline
or try without installing:
pi -e /path/to/pi-light-statusline
No configuration needed — sensible defaults apply. Restart pi (or /reload).
Segments
| id | default side | icon | shows |
|---|---|---|---|
model |
right | active model id, lowercased | |
thinking |
right | | thinking level; high/xhigh/max get a rainbow color |
path |
line 1 | current directory basename | |
git |
line 1 | current branch | |
context |
line 1 | context usage 53k/1.0M (5.3%); warning > 70%, error > 90% |
|
tps |
line 2 | 47 tok/s live during streaming, frozen after; hidden the first second |
|
cache_rate |
line 2 | cache hit rate of the latest turn, 78% |
Empty segments (no git branch, no tokens yet) hide themselves.
Configuration
Everything lives in one lightStatusline block of ~/.pi/agent/settings.json.
Arrays set segment order; omit them to keep defaults.
{
"lightStatusline": {
"line1": ["path", "git", "context"],
"line2": ["tps", "cache_rate"],
"right": ["model", "thinking"],
"colors": {
"model": "#0ABAB5",
"path": "#e06c75",
"git": "#1a7f37",
"context": "#98c379"
},
"icons": { "tps": "" },
"vibes": { "enabled": false }
}
}
line1/line2/right— ordered segment ids per row: line 1 (path/git/context), line 2 stats (tps/cache_rate), right-aligned (model/thinking). A legacy singleleftarray is split automatically. Unknown ids are ignored.colors— per-segment color: any pi theme color name (accent,warning,dim, …) or#RRGGBB. Defaults are muted theme colors;contextalways escalates towarning/errorat 70%/90%.icons— per-segment icon override. Detection follows your terminal (setLIGHT_STATUSLINE_NERD_FONTS=1to force Nerd Font icons,=0to disable).
Vibes
While pi works, replace the boring default loader with a themed, task-aware message generated by a model of your choice — for example:
⠦ 凝神聚念,洞彻微观玄机...
{
"lightStatusline": {
"vibes": {
"enabled": true,
"theme": "神龙尊者", // your persona
"model": "mccodex/LongCat-Flash-Chat", // any configured pi model
"fallback": "龙威震世", // shown on failure/timeout
"prompt": "…", // optional custom template
"maxLength": 18,
"timeoutMs": 3000,
"color": "rainbow" // optional: color name, #hex, or "rainbow"
}
}
}
One generation per agent run (no per-tool-call refresh spam). The prompt
template supports {theme}, {task} (the current prompt), {exclude}
(recent vibes, to avoid repetition) and {maxLength}. On timeout or error the
fallback message stays — vibes never break your session.
License
MIT © L2ncE