CodeBuddy credit & cost analytics
codebuddy_usageTrack CodeBuddy credit, expiring packages, token usage, cache-hit rates, per-model costs, daily consumption, top tasks, and burn-rate runway forecasts from local CLI and swarm run logs.
Instructions
CodeBuddy/WorkBuddy account credit (read-only billing API, cached 10 min, with expiring-soon package alerts) + deduplicated local consumption across both CLI JSONL transcripts and swarm cb-runs state files (including ephemeral runs): tokens & cache-hit rate, per-model/per-profile unit economics, daily breakdown, top tasks, and burn-rate runway forecast.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "codebuddy_usage"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| refresh | No | Skip the cache and ask the billing API now. | |
| sinceDays | No | Local consumption window, default 7. | |
| expiringSoonDays | No | Expiring-package warning window in days, default 7. |