Statusline
Custom statusline with cost, context, git status, and usage limits tracking.
Custom statusline displaying cost, context, git status, and usage limits.
Features
- Git branch with staged/unstaged indicators
- Session cost and duration
- Context tokens and percentage with progress bar
- 5-hour and weekly usage limits with pacing
- Daily spend tracking
Configuration
Run the interactive config:
BASH
cd ~/.claude/scripts && bun run statusline:configControls:
↑↓orj/k- Navigate optionsSpace- Toggle selected optionR- Reset to defaultsQ- Quit
Commands
| Command | Description |
|---|---|
statusline:config | Interactive configuration |
statusline:start | Run statusline (needs stdin JSON) |
statusline:spend:today | View today's sessions and cost |
statusline:spend:month | View monthly spending by date |
statusline:spend:project | View spending per project |
statusline:stats | View usage statistics |
statusline:weekly | Weekly usage analysis |
statusline:migrate | Migrate data to SQLite |
Configuration File
Config stored in ~/.claude/scripts/statusline/statusline.config.json.
Key options:
JSON
{
"oneLine": true,
"pathDisplayMode": "truncated",
"separator": "·",
"session": {
"cost": { "enabled": true, "format": "decimal1" },
"duration": { "enabled": false },
"tokens": { "enabled": true, "showMax": false },
"percentage": {
"enabled": true,
"progressBar": {
"enabled": true,
"length": 10,
"style": "braille",
"color": "progressive"
}
}
},
"git": {
"enabled": true,
"showBranch": true,
"showStaged": true,
"showUnstaged": true
},
"limits": {
"enabled": true,
"showTimeLeft": true,
"showPacingDelta": true
},
"weeklyUsage": {
"enabled": "90%"
}
}Setup
Add to ~/.claude/settings.json:
JSON
{
"statusLine": {
"type": "command",
"command": "bun ~/.claude/scripts/statusline/src/index.ts",
"padding": 0
}
}