A Pi coding agent extension that monitors your StepFun API account balance and automatically displays it in the footer when using a StepFun provider.
- Auto Footer Display: Shows available account balance when using StepFun models
- Smart Caching: Caches balance data for 30 seconds to avoid excessive API calls
pi install npm:@alexanderfortin/pi-stepfun-usageor
pi install git:github.com/shaftoe/pi-stepfun-usage
or test from source:
git clone https://github.com/shaftoe/pi-stepfun-usage
cd pi-stepfun-usage
bun install
bun run build
pi -e .When using a StepFun model (e.g., step-3.7-flash, step-3.5-flash), the extension automatically displays your available account balance in the footer:
StepFun: $12.50
The footer updates after each AI turn and on model selection changes. When you switch away from a StepFun model, the footer is cleared.
No configuration needed. The extension automatically:
- Uses cached data for 30 seconds to avoid excessive API calls
- Shows/updates status only when StepFun models are active
- Clears status when switching to non-StepFun models
Make sure your StepFun API key is configured (e.g., via STEP_API_KEY environment variable or Pi's provider settings).
The extension uses the StepFun account endpoint: GET https://api.stepfun.ai/v1/accounts
# Run tests
bun run test
# Type check + lint
bun run check
# Auto-fix lint issues
bun run lint:fix
# Watch mode
bun run devMIT
