Readit News logoReadit News
Posted by u/Maciej-roboblog 2 months ago
Show HN: Claude Code Usage Monitor – real-time tracker to dodge usage cut-offsgithub.com/Maciek-roboblo...
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!

loufe · 2 months ago
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 · 2 months ago
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 · 2 months ago
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.

partdavid · 2 months ago
It strikes me as very much a current aesthetic in younger companies or smaller startups, maybe highly influenced by Notion. No one makes a list or page or calendar invite in my current company without choosing an emoji for it.
adastra22 · 2 months ago
It was cool until 2022. Then LLMs started injecting these emoji everywhere and it became the chief marker for code/doc smell.
ljm · 2 months ago
It never caught on but I always liked setting the jumbo header images on Notion docs to creepy, unsettling pictures from Unsplash.

Need to write a document about converting a Rust project to Typescript? A picture of an abandoned warehouse full of expressionless baby doll heads fits perfectly.

wredcoll · 2 months ago
> 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

The irony of comments like this on software designed entirely for ai coding...

cchance · 2 months ago
Looks so unprofessional, lol, says the guy wanting to use a free app, this isn't a microsoft made app lol it's a guy making a github app for free the audacity people have these days to shit on peoples project for 0 reason
lukan · 2 months ago
AI coding where the human stays in control and reads and confirms code is totally different from vibe coding where you don't read code and just prompt until it sort of works.
youcefb · 2 months ago
if you actually look at the code, it's a single 400 line python file that just wraps https://github.com/ryoppippi/ccusage, so it's possible
radicality · 2 months ago
Yeah I noticed that too, it’s a bit crazy to me that stuff like this is getting upvotes and traction. It feels like it was vibe-coded in one-shot style without perhaps even reading any bit of the code. A bunch of hardcoded values, a `sleep(3)`, bunch of other antipatterns.

Up until recently I tended to “trust” github repos a bit more, now I feel like I need to have my guard up so I don’t fall into a trap of using something like this. Funnily enough a good first metric for me now is # of emojis in the readme - the more emojis the more likely you should stay away from it

danielbln · 2 months ago
My goto for AI generated PR descriptions and README is this addition to the prompt: tight, no purple prose, no emojis.

That turns thrse meandering emoji fests into suitable documentation. YMMV

joshmlewis · 2 months ago
For a reference point, it says my max session limit in the past was ~337,492 tokens and I have the Max20 plan and 99% use Opus.

My total tokens used since I started using Claude Code on May 27th was 1,374,439,311 worth around $3397.34.

WXLCKNO · 2 months ago
I'm around ~2100 dollars equivalent on Max20 plan.

Do they have huge margins on API or are they just losing money? I use it everyday but I don't feel like I'm abusing it or anything

joshmlewis · 2 months ago
I've been wondering this too. They said on a podcast that the average usage is around $6 a day in credits but I really question that. If that's the case though and they do have a lot of Pro and higher tier subscribers that might be making up the difference.
cchance · 2 months ago
Huge margins on API lol, there's a reason the guys from deepseek told everyone that its bullshit that the big boys aren't making money, research is expensive but the inference isn't especially with the comments that even Sam Altman mentioned regarding pricing per response for the chat clients.
sagarpatil · 2 months ago
1. Don’t you hit rate limits on Opus? Don’t you find it slow compared to sonnet?
joshmlewis · 2 months ago
I have not ever actually hit the rate limit as far as I'm aware. I have gotten the "approaching Opus usage limit" a couple times but have not hit it.
jbentley1 · 2 months ago
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.
furyofantares · 2 months ago
This is excellent. I am an EXTENSIVE Claude Code user but I've been a bit scared to write my own tooling around worktrees + multiple sessions because I don't understand git well enough.

To be honest, I'm a little scared to use this also. I feel like ideally each worktree would also run in a container, but that seems quite a bit harder to make work as smoothly as this does.

Maciej-roboblog · 2 months ago
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
pmarreck · 2 months ago
This is great but Crystal is already the name of a language I've messed with...
rgoodwintx · 2 months ago
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.
jjice · 2 months ago
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.

rgbrenner · 2 months ago
pro is the $20/mo plan that they recently started allowing access to claude code.. but i’ve heard users hit the rate limit with a few queries.. so imo that sounds about right. the chat interface has its own limits separate from claude code.
ffsm8 · 2 months ago
Has to be wrong. I'm on that subscription as I wanted to reinforce my opinion that it's still shit for devs that actually have experience, like it was a few months ago.

While my plan didn't pan out, cuz it was way too effective, I can confidently say that I'm going through 3-6k tokens per prompt on average, and usually get around 3 hours of usage before I'm hitting the rate limit.

The limit is probably closer to 300k then <10k

Also the chat interface doesn't have a separate limit, once you hit it via Claude code, you cannot use the website either anymore.

Maybe it's a 7k limit per prompt? Dunno if I exceeded that before

PeterStuer · 2 months ago
I tried it with Roo Code (with 3.7 Sonnet, not Code). For agentic use you will probably hit the limit from your first prompt/assignment if it does some browser tool use.
_august · 2 months ago
I'm noticing that Token usage doesn't reset after the time window unless you hit 100%.

This seems like a problem if for example, you hit 90% usage, pass the window, then burn through the remaining 10% quickly and have to wait a long time.

radicality · 2 months ago
Uhm, does this do anything else useful besides shelling out to https://github.com/ryoppippi/ccusage ? Idk, this kind of stuff feels a bit disappointing, also feels like it’s perhaps one-shotted with some AI tool, and in this show hn you don’t even mention that all the actual work is done by some other tool.
_august · 2 months ago
Incredible, thank you for making this!

Can this be installed with uv? https://github.com/astral-sh/uv

Edit:

  # Install uv
  curl -LsSf https://astral.sh/uv/install.sh | sh

  # Install the required CLI tool (Node.js)
  npm install -g ccusage

  # Clone and setup
  git clone https://github.com/Maciek-roboblog/Claude-Code-Usage-Monitor.git
  cd Claude-Code-Usage-Monitor

  # Install Python deps with uv
  uv add pytz
  chmod +x ccusage_monitor.py

  # Run it
  uv run python ccusage_monitor.py --plan max20 --timezone America/New_York

whyho · 2 months ago
If the repo was structured as a package e.g. with project.toml and such there would be an even faster one-liner with pipx (https://pipx.pypa.io/latest/):

> pipx install git+https://github.com/Maciek-roboblog/Claude-Code-Usage-Monitor

> ccusage_monitor

I think there is a similar command for uv; uvx? Although, I am not sure if uvx has the same functionality / purpose as pipx.

throwaway314155 · 2 months ago
This is appreciated but FWIW basically anything that can be installed with pip is also trivial (easier, even) to install with uv.
tianqi · 2 months ago
I can just sense how far it's from reaching my limit, and my sense is quite accurate. I can also sense when a conversation is about to reach its own maximum length, so I use the last resource to generate a summary so that I can start a new conversation and resume progress. Ironically, these AI tools have become part of my biological clock. Besides Claude, every Wednesday is like a new kind of Sunday for me, because my ChatGPT's weekly limit is reset on Wednesdays.