Tracking AI Quota/Budget for Command Code

Azure Infrastructure

I’m primarily using Command Code with my Hermes Agent to access a variety of models like Fable, Grok, GLM, DeepSeek and recently Tencent Hy3 (was free for a couple of weeks). Just like a Claude subscription, it has a 5-hour budget and a weekly budget. However, these budgets are *extremely* generous. I was running out often with my Claude subscription (even with Sonnet) but I never run out with Command Code.

Still, I wanted a way to see my burn rate. Claude has their Usage section that you can see when you login to your account and people have made apps or plugins that will report that information to you. As far as I can tell, nothing like that exists for Command Code, so I built it. I mean, I had my agent build it.

Hermes AgentBar

I set out to build a small tray application for Windows, that would show a pop-up with some usage information. The two LLM routers that I’m using are Command Code (subscription with budgets) and OpenRouter (pay per use only). Here’s what I ended up:

Command Code budgets at a glance
OpenRouter credit remaining

This is a vibe-coded python app (as in, my agent built it with my guidance). The budget status for Command Code is pulled every few minutes, based on your configuration. I think 10 minutes is fair. You can expand the Token Usage section to see details on input, output, and reasoning token usage. That information is derived from Hermes’ state.db file.

For OpenRouter, you load your account with credits, usually $20 or $100 but any amount. As you use the different models, your credits get drawn down. The OpenRouter tab gives you what’s remaining on your account – direct from the OpenRouter API. If you don’t use OpenRouter and don’t configure it, the tab won’t be there.

Made for remote agents

My primary interface for Hermes is their official Windows Desktop app so I’m usually on my Windows PC – that’s where I want this app. I host my Hermes Agent remotely on a virtual machine in my home lab, but many people use a cheap VPS (virtual private server) such as the $4/month Hetzner VPS.

We need a way for the app on Windows to talk to Hermes so it can track usage. For this, my agent built a lightweight http bridge service for Linux. You simply install that and give the IP:port in the config file.

What’s the point

With this app sitting in my tray icon, I have a quick and easy way to assess token burn. If i’m working on some multi-agent workflow that may be using several different models or Mixture of Agents mode where 3 to 4 models are consulted and aggregated, I can monitor and adjust. If the burn is too high, I may switch to cheaper models or plan to take a break for the budget to reset.

Feel free to use it as-is but I hope others will expand it to cover more subscriptions like native Z.AI Coding Plans, OpenCode, Alibaba (Qwen), Claude, OpenAI and others.

Source code and setup instructions on GitHub.

0 comments… add one

Leave a Reply