Show HN: Claude Code Usage Monitor – real-time tracker to dodge usage cut-offs
75 comments
·June 19, 2025bevan
Something like this would be great for Cursor, I never know how many credits I’m up to for the month or how much my Max calls are costing.
loufe
I really like this idea as I find Claude's transparency frustrating. Claude code's killer features revolve around better tools to manage context and limits vs the desktop app (compact and the % remaining until auto compact), but it's not enough.
If I can offer any advice, it's that the high use of emojis in a project readme (at least for me) looks so unprofessional and makes me worry that a project was vibe -coded in the sense that the AI was possibly not babysat to the extent I think they should. That's just me, though
oc1
I got into software in a time where you would get sent to a mental institution when spotted using emojis in a code base. Times have changed.. I use emojis regularly because they help me organize context more visually. Code has now many emojis to keep me happy.
Maciej-roboblog
This code was written in pure vibe-coding style — mostly for fun. I've got about 10 years of experience in IT, and even I fully agree: a 1000-line main file like this one probably deserves to be locked away in a secure facility.
But hey — if it's stupid and it works, it ain't stupid.
lukan
Always depends on the cost of failure I suppose.
jjice
Very neat! Is the limit on Pro really only 7k tokens? So less than 7k words? I feel like I get more out of that. It feels like that would blow up pretty quickly with an ongoing chat, but I never hit that.
Or is this a Claude Code specific limit? I haven't used Claude Code extensively yet.
jbentley1
This is great. I built a UI tool to run simultaneous Claude Code sessions (https://github.com/stravu/crystal) but by working on multiple features at once I hit the limits of my max account. Usually close to the reset, but it would be nice to know when it is time to take a break.
rgoodwintx
Kudos! I was just thinking about having. Laude write something like this for me. Not just within a project but the 5 different ones I have open at the same time. Too much of a good thing etc.
Maciej-roboblog
Please write for me on github or create issue https://github.com/Maciek-roboblog/Claude-Code-Usage-Monitor... and we can try integrate your tool with usage monitor
bilekas
This is pretty cool.. I like the idea, could I make a semi-snarky feature request and could we add the estimated power consumed to produce results for each session ?
tln
Or just straight to CO2. Google said 1000 tokens emits 8.3g CO2.
How many tokens used in a heavy vibe coding day?
Average US daily per capita is like 40kg CO2
KMnO4
I don’t understand the concern of this. Let’s say it says you’ve used 1.521kg of CO2 today. How is that actionable?
A single flight from JFK to LAX produces around 20,000kg of CO2. Using the 8.3g value means a flight is equivalent to 2.41 billion tokens.
taosx
I really dislike when people don't see this. They try to cut 10 grams of CO2 per day while other industries (shipping, aviation, rails) produce hundreds of tons per day and even this transportation modes are less that 20% with most CO2 produced mainly being in energy production and used by industry.
bilekas
It doesn't necessarily need to be actionable for now but at the moment there is an exponential growth in the datacenter power usages.
For now, sure it might be ridiculously minor, but when it starts to ramp up who's to say it wont be just a ridiculous amount of energy ? Maybe not even measure the CO2, but I would love to graph the increase of energy spent over time.
notarobot123
if you take the long view, flying is irrational too
pinoy420
[dead]
TypingOutBugs
Soon we will have low carbon developers
ozim
Let's start with npm and node_modules first - I think it is responsible for at least half of the global warming.
Maciej-roboblog
Greta would be proud, but I’m not sure how the number of tokens relates to energy consumption.
actsasbuffoon
Soon the AI companies will have different tiers of plan based on carbon output.
For $200 per month they’ll only use carbon-free power sources for your prompts. At $100 they’ll use nuclear, then $20 per month for coal, and then there will be a free tier where your prompts are powered by throwing baby seals into a furnace.
Lerc
This may be pedantic, but I'm guessing baby seals are a renewable resource.
ed_mercer
Thank you! For me, I wish it was just a simple command that outputs how much I have used out of my plan already. Also I feel it’s a bummer that I need python when CC is a node.js tool.
Maciej-roboblog
I will update it in next release :D And you will be able to install the package directly.
alFReD-NSH
How it does it monitor usage?
Maciej-roboblog
Check directory ~/.claude/projects/*/*.jsonl ;) hah very interesting topic. I have a plan to write blog post about it (all conversations history with metadata inside json lines files) What do you think about this idea? Interesting?
M4v3R
Wow, I had no idea Claude Code had this kind of verbose logging turned on by default. Looking around I also found a cool tool for converting these logs to HTML format for easy viewing: https://github.com/daaain/claude-code-log
Maciej-roboblog
Haha, in that case it sounds like an article I could actually handle. By the way, is it better to go with an article or short-form video?
alFReD-NSH
It's definitely interesting. Probably, one could also see how much of the context is unnecessary to optimise usage. I wonder if one could also detect whether cache was used.
Maciej-roboblog
Yes, cache write and read is available to fetch i can add new flag to view this values, please create issue in repository with this idea https://github.com/Maciek-roboblog/Claude-Code-Usage-Monitor...
Hortinstein
Is there anyway to ensure these logs are output in a current project folder? Would like to store a copy in git for reference
Maciej-roboblog
Yes in next relesase with duckdb, We will have the possibility of a simple export
soco
I keep the credits page open and refresh it from time to time, because I honestly only care about money, not about tokens whatever these are.
Maciej-roboblog
This tool is for plans with a fixed cost — like Pro Max x5 or x10 — not for API usage.
mellosouls
For cursor users, a similar extension to monitor usage:
Maciej-roboblog
Probably for API cost. It is for fixed price plans usage
Maciej-roboblog
Today, I will commit a new Auto Mode (with DuckDB) that uses machine learning to understand your actual token limits, not hardcoded solution.
diego_moita
Is there something similar to this but for Gemini?
Maciej-roboblog
I can implement tool like this for Gemini, please create issue https://github.com/Maciek-roboblog/Claude-Code-Usage-Monitor... with this idea
teekert
Claude is cool, they focus on cool and useful things.
But man do I just want a way to quickly glance at my API credits and to just occasionally chat with a model from those credits without librechat of openwebui. Or set some limits, or see some usage metrics.
And please please use "forever auth" with passkeys or something, what is up with that auth email that just takes ages for a quick glance?! It always takes me 3 attempts to find what address I used at sign-up...
Oh and make it clearer why you have that API/credits system and a subscription, why is it so difficult to understand when you start using Claude that it's 2 different unrelated worlds?? First time I started my subscription I just couldn't figure out where the API section was, until I realized it just wasn't there.
I feel like I'm "holding it wrong", but please make it easier to hold it right then.
redrove
>And please please use "forever auth" with passkeys or something, what is up with that auth email that just takes ages for a quick glance?! It always takes me 3 attempts to find what address I used at sign-up...
As a person with the simple but brilliant technology of a freaking password manager, I LOATHE email to login/no-password websites. They are dreadful, we've somehow managed to come up with something worse in UX rather than move forward.
If you're working on a product that does this, or wants to do this, please please PLEASE reconsider, it's such a PITA for technical users and normies alike.
rtsil
I used to think the same thing, and I still want a login/password alternative for me. But after seeing normies use online accounts and the trouble they have with password managers, I realized one of my friends had the most secure process: she would create extremely high-entropy passwords everywhere, but not remember them. Once she's logged out of her sessions after a couple of months, she uses the password forgotten link to generate another password, and so on. So her passwords are never stored anywhere, she's immune to many login stealing phishing attempts through genuine-looking fake websites as she can't enter the password, she doesn't have to deal with syncing the passwords between all her devices, and she doesn't have passwords on a post-it on her workstation. And she also doesn't get those annoying emails saying "your password is 6-months old, please change it or else!".
The email auth flow is a simplified and more efficient way to achieve the same outcome.
dietr1ch
yeah, I find it annoying, but it's a simple way of making something secure, piggyback on something that already made a decent effort at trying to being secure enough.
threeducks
Another reason to ditch email-to-login: It decreases active user count because login is such a chore. I only use those websites if I absolutely have to and there are no alternatives.
null
teekert
Yeah, it's the reason I eventually tuned out of Slack too (obviously I don't use it day to day). I used it for some things, some community stuff, every now and then.
So when I open it up on a new machine or after months, you have to go through that magic link bs multiple times! For all your accounts/channels! I did that 2 or 3 times and then I just stopped using it.
I don't even remember what I signed up for over the years, I know some of it was nice (like an LoRa IOT channel, an "AWS professionals" channel, I set something up for the LoRaWan network in the previous city I lived in... All just tuned out because of the login bs.
sokoloff
I don’t get why Slack can’t figure out how to help me migrate all my workspaces on a device I still have and am logged into in a new one in fewer than 3 steps per workspace. Sure, if I’ve lost all devices with the workspaces connected, maybe it needs to be that much PITA, but it’s a pretty common case to add/switch to a new machine or device and that process is obnoxiously poorly executed right now.
Maciej-roboblog
I can write a blog post about this, plus in the next release, DuckDB will be implemented along with a slightly more advanced max tokens algorithm.
null
I kept slamming into Claude Code limits mid-session and couldn’t find a quick way to see how close I was getting, so I hacked together a tiny local tracker.
Streams your prompt + completion usage in real time
Predicts whether you’ll hit the cap before the session ends
Runs 100 % locally (no auth, no server)
Presets for Pro, Max × 5, Max × 20 — tweak a JSON if your plan’s different
GitHub: https://github.com/Maciek-roboblog/Claude-Code-Usage-Monitor
It’s already spared me a few “why did my run just stop?” moments, but it’s still rough around the edges. Feedback, bug reports, and PRs welcome!