Expose API usage percentages in statusline JSON
Resolved 💬 2 comments Opened Nov 19, 2025 by trevyn Closed Nov 19, 2025
Feature Request
Currently the statusline JSON includes cost data (total_cost_usd, duration, etc) but doesn't expose API usage limit percentages that are visible in the UI.
Use case: Want to display session/weekly usage percentages in a custom statusline to track how close I am to rate limits.
Current workaround: None - the data isn't available in the JSON passed to statusline scripts.
Proposed solution: Add an apiUsage field to the statusline JSON with structure like:
{
"apiUsage": {
"session": {
"percentUsed": 12.5,
"tokensUsed": 25000,
"tokensLimit": 200000
},
"weekly": {
"percentUsed": 45.2,
"tokensUsed": 904000,
"tokensLimit": 2000000
}
}
}
This would enable users to create statuslines that show usage % with color coding (green/yellow/red) based on proximity to limits.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗