Pi extension: /cc-usage shows Command Code plan credits and the 5-hour / weekly rolling limits.
Unofficial. Not affiliated with Command Code or Pi. It calls the same undocumented /alpha billing routes the Command Code CLI uses. Those routes can change without notice.
Needs a Command Code user_... key already configured for Pi (the same commandcode block in auth.json that pi-commandcode-provider uses).
Local path (this machine, or a copy on Windows):
pi install /absolute/path/to/commandcode-usage-for-piFrom GitHub:
pi install git:github.com/gonegirl07/commandcode-usage-for-piThen restart Pi or run /reload.
/cc-usage
Example:
Command Code individual-go
Month $8.77 / $10 left
5-hour $0.14 / $3 reset Aug 16, 19:15
Week $1.23 / $6 reset Aug 22, 10:44
Cycle ends Sep 15, 2026
Reset times use the local timezone. There is no footer and no background refresh.
pi remove /absolute/path/to/commandcode-usage-for-piOr, once installed from git:
pi remove git:github.com/gonegirl07/commandcode-usage-for-piReuses Pi's Command Code key:
ctx.modelRegistry.getApiKeyForProvider("commandcode")(~/.pi/agent/auth.json)COMMANDCODE_API_KEYif the registry has no key
It does not read ~/.commandcode/auth.json.