@duskmoon/pi-starship-footer
Starship-powered statusline for Pi coding agent
Package details
Install @duskmoon/pi-starship-footer from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@duskmoon/pi-starship-footer- Package
@duskmoon/pi-starship-footer- Version
0.1.0- Published
- Aug 29, 2026
- Downloads
- 126/mo · 7/wk
- Author
- duskmoon
- License
- MIT
- Types
- extension
- Size
- 26.8 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
pi-starship-footer
Starship-powered footer for Pi coding agent.
Preview
↑223k ↓67k CR 30M CW 5k 99.9% 18.8k/1.0M (15%) $0.0042 ⏱ 5m32s deepseek-v4-flash [high] (deepseek)
my-project main ✘!? v24.15.0 v3.12.3
- Line 1: token stats (↑ input, ↓ output, CR cache-read, CW cache-write, cache-hit), context, cost | session time, model [thinking] (provider)
- Line 2: directory, git branch/status, detected languages
Requires starship. If it is not installed, a warning with install instructions is shown and pi's default footer stays in place.
Installation
pi install npm:@duskmoon/pi-starship-footer # from npm
pi install git:github.com/duskmoon314/pi-starship-footer # from git
Requires starship:
curl -sS https://starship.rs/install.sh | sh # or: brew install starship / cargo install starship
Configuration
Config search order — first match wins:
<cwd>/.pi/pi-starship-footer.toml(project)~/.pi/pi-starship-footer.toml(global)<extension-dir>/pi-starship-footer.toml(bundled default)
Copy the bundled pi-starship-footer.toml as a
starting point. It is a standard starship config;
session data arrives through PI_* env_var modules:
add_newline = false
format = '''
${env_var.PI_TOKENS} ${env_var.PI_CONTEXT} ${env_var.PI_COST} $fill ${env_var.PI_MODEL} ${env_var.PI_THINKING}
$directory$git_branch$git_status
'''
Note: Variables with no data (e.g.
PI_CACHE_HITbefore the first response,PI_THINKINGwhen thinking is off) are unset, not empty — starship hides their modules entirely. Put icons/brackets in the moduleformat, not the top-level format string, so they disappear too.
Environment Variables
Display-oriented (used by the default config):
| Variable | Description | Example |
|---|---|---|
PI_INPUT |
Input tokens | ↑223k |
PI_OUTPUT |
Output tokens | ↓67k |
PI_CACHE_READ |
Cache read | CR 30M |
PI_CACHE_WRITE |
Cache write | CW 5k |
PI_CACHE_HIT |
Cache hit rate | 99.9% |
PI_CONTEXT |
Context usage | 18.8k/1.0M (15%) |
PI_COST |
Session cost | $0.0042 |
PI_SESSION_TIME |
Session duration | 5m32s |
PI_MODEL |
Model ID | deepseek-v4-flash |
PI_THINKING |
Thinking level (unset when off) | high |
PI_PROVIDER |
Provider | deepseek |
Raw / additional:
| Variable | Description | Example |
|---|---|---|
PI_TOKENS |
Combined token summary | ↑223k ↓67k R30M CH99.9% |
PI_TOKENS_INPUT/OUTPUT/CACHE_READ/CACHE_WRITE |
Raw token counts | 223000 |
PI_CONTEXT_PCT/USED/TOTAL |
Context parts | 15, 18800, 1000000 |
PI_COST_RAW |
Cost as number | 0.0042 |
PI_CACHE_HIT_RAW |
Hit rate without % |
99.9 |
PI_MODEL_FULL / PI_MODEL_NAME |
provider/id / display name |
deepseek/deepseek-v4-flash |
PI_SESSION_ID/NAME/FILE/DIR |
Session identifiers | … |
PI_SESSION_TIME_MS |
Duration in ms | 332000 |
PI_CWD / PI_GIT_BRANCH |
Working dir / branch | /home/user/project, main |
Commands
| Command | Description |
|---|---|
/starship-footer |
Show status and available variables |
/starship-footer-reload |
Reload configuration |
Credits
- starship-claude — inspiration
- Starship — the prompt framework
License
MIT License © 2026 duskmoon314