[HN Gopher] Ccusage: A CLI tool for analyzing Claude Code usage ...
___________________________________________________________________
Ccusage: A CLI tool for analyzing Claude Code usage from local
JSONL files
Author : kristianp
Score : 73 points
Date : 2025-07-18 23:22 UTC (23 hours ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| thebestmoshe wrote:
| I really like how easy it is to run using bunx, pnpx, npx, etc.
|
| But does anyone have thoughts on the security aspect. Getting
| people used to just running code like this that has full access
| to the system is slightly concerning.
|
| On the other hand it's no different than installing npm packages
| simonw wrote:
| Maybe this kind of thing would be better written in Deno?
|
| Deno has mechanisms for allow-listing the exact files the
| process can access - in this case you would want to give it
| read-only access to the log files in the ~/.claude directory
| and nothing else.
| ghuntley wrote:
| > anyone have thoughts on the security aspect
|
| Yes, you need to run these agents in a sandboxed environment
| when running full AFK [1] yolo. That could be a Docker
| container or it could be remote developer environment.
|
| [1] https://ghuntley.com/ralph
| pjm331 wrote:
| They are talking about the fact that you can run this npm
| tool without installing it - not running code agents
| ghuntley wrote:
| Ah, that's the least of their issues!
| extr wrote:
| Have been using this for awhile, I'm on the $100/mo Max plan and
| have been running $600-800/mo in terms of usage, and I'm hardly
| pushing it to the limits (missing lots of billing windows).
|
| It makes me wonder what Anthropic's true margins are. I could
| believe they are overcharging via the API, Sonnet is $3/$15/Mtok
| and Opus at an ABSURD $15/$75/Mtok. But to break even for me,
| that would mean that they're overcharging by a factor 5x-10x,
| which doesn't seem possible. Is the music going to stop for
| Claude Code the same way it did for Cursor? I have to imagine
| every incentive in the world is pushing them to lower inference
| cost rather than introduce stricter limits, and unlike Cursor
| they can actually can reach into their stack and do this. But I'm
| not sure they're capable of miracles.
|
| Regardless, I'm bullish Anthropic. Sonnet and Opus don't
| benchmark as well as O3/Grok4 at pure coding, and aren't as cheap
| as Kimi K2 for theoretically similar perf, but as any user knows
| they are top tier at instruction following, highly reliable and
| predictable, and have a certain intangible theory of mind that is
| unique to Anthropic.
| wyldfire wrote:
| > Sonnet and Opus don't benchmark as well as O3/Grok4 at pure
| coding
|
| Do any of the others have a "claude code" local agent? Seems
| like a big gap IMO. Though, it should be pretty easy for them
| to close that gap.
|
| I don't usually take too many moral stances but I feel like I
| can't use Grok. It's bad enough Musk did his Nazi salute but
| his AI product itself is a Nazi too? It might be good at coding
| but I really can't stomach using it.
| sothatsit wrote:
| FWIW, people report that Grok 4 is not very good at coding,
| and xAI admit this themselves when they said they will be
| releasing a separate coding model in "the next few weeks".
|
| Also, Google does have Gemini CLI, OpenAI does have Codex
| CLI, and then there is Aider which can support any model. I
| think the big difference is that Anthropic's models are the
| best for this use-case right now, and Anthropic has the Max
| plan which makes a massive difference to the cost of using
| Claude Code compared to competitors (although the Gemini CLI
| has insane free tiers).
|
| I'm not sure how this will play out in the future, because it
| seems to me that Claude Code does not have much of a moat
| beyond Anthropic having the best coding models right now, and
| them offering model usage at heavily discounted prices.
| ghuntley wrote:
| > people report that Grok 4 is not very good at coding
|
| There are agentic models and oracle models. It can be
| modelled on a four-way quadrant of agent vs oracle and high
| safety vs low safety.
|
| https://ghuntley.com/cars
|
| Grok is oracle and low safety.
| perfmode wrote:
| perhaps there are enough inactive subscribers to compensate for
| the heavy users.
| buremba wrote:
| I doubt that there are many inactive subscribers, as Claude
| Code / Max Plan is relatively new. They might be hoping that
| way in a couple of months, though.
| Aeolun wrote:
| I used it really heavily for a few days, but now I just don't
| have the time to send much instructions. Still used on the
| order of $1000 in the first month, but imagine it will go
| down as time goes on. CC is so convenient I think I'd have a
| hard time living without it though
| sothatsit wrote:
| > but as any user knows they are top tier at instruction
| following, highly reliable and predictable
|
| This is spot on. Reliability is really the #1 priority for me
| when it comes to coding agents, and Sonnet, and especially
| Opus, really deliver on it. It makes such a huge difference
| when it comes to agents. Anthropic really nailed it on this.
|
| My process has become: get Opus to generate a plan, use o3 to
| help me review the plan, and then get Opus to implement the
| plan. This works extremely well for me, and is the first time
| where I've felt AI being actually useful for coding anything
| more than small prototypes.
| buremba wrote:
| How do you switch to o3 to review the plan?
| drakenot wrote:
| Have CC output a plan.md file.
| extr wrote:
| Personally, I use Repoprompt for this + deeper context
| integration.
| sothatsit wrote:
| I have a workflow that tells Claude Code to generate a
| planning markdown document: https://gist.github.com/Sothats
| it/c9fcbcb50445ebb6f367b0a6ca...
| shmoogy wrote:
| I use zenMCP to collaborate with opus
| swyx wrote:
| any dropoff in usage limits for you recently?
| https://techcrunch.com/2025/07/17/anthropic-tightens-usage-l...
|
| cant help but think that you guys yelling about it so loudly
| from the rooftops is really really not helping your case lol
| core-utility wrote:
| I started on the Pro plan a week ago and was already
| contemplating jumping to Max. When I hit a limit yesterday I
| upgraded to Max and hit a limit again before seeing the news
| of the changed usage limit.
|
| For what it's worth, everything seems fixed today.
| ghuntley wrote:
| Exactly, swyx. Any flat rate pricing plan is effectively a
| bet against the future. It's a grab for engineers that's
| subsidised. Now, the problem is that GPUs are expensive; they
| are a costly resource to use. Inferencing is expensive.
|
| So what happens is inevitable:
|
| - Wild promises of unlimited usage and consumers feeling
| tricked when the impossible is impossible to deliver (Cursor
| pricing changes).
|
| - Quasi-unlimited usage with rate-caps, but the models get
| quantised to all hell? [search Twitter for folks reporting
| Claude feels dumber around/near outages].
|
| - Engineers sharing tools and techniques on how to squeeze
| pounds out of a flat-rate plan (original post), which results
| in more power users doing that, which puts more pressure on
| margins.
|
| In goose meme format, "What are the margins?"
|
| https://x.com/GeoffreyHuntley/status/1945636266009399414
| kristianp wrote:
| > Any flat rate pricing plan is effectively a bet against
| the future
|
| How quickly we forget Moore's law, or at least what has
| replaced Moore's law.
| extr wrote:
| People have been saying this since it first came out. I don't
| doubt there are occasional bugs/service disruptions but
| personally I really doubt Anthropic is silently decreasing
| the limits.
| nidnogg wrote:
| What do you mean by music stopping for Cursor? Almost every
| single developer I run into is transitioning/transitioned to it
| today. It's stinks like the new VS Code.
| ghuntley wrote:
| There's a predictable journey: people start with Cursor when
| they are new to AI, and quickly move on to something more
| powerful once they realise that the IDE [1] is holding em
| back and that forking VSCode is [2][3] tech-debt.
|
| [1] https://ghuntley.com/overton
|
| [2] https://ghuntley.com/fracture
|
| [3] https://ghuntley.com/amazon-kiro-source-code/
| extr wrote:
| Their pricing change recently has people reaching for
| alternatives.
| ryoppippi wrote:
| I'm the author of ccusage. Thank you for sharing! Also please
| refer our website. https://ccusage.com
___________________________________________________________________
(page generated 2025-07-19 23:01 UTC)