YouTube Deep SummaryYouTube Deep Summary

Star Extract content that makes a tangible impact on your life

Video thumbnail

ccusage: The Claude Code cost scorecard that went viral

Greg Baugues (@greggyb) • 22:51 minutes • Published 2025-07-10 • YouTube

📚 Chapter Summaries (11)

📝 Transcript Chapters (11 chapters):

📝 Transcript (529 entries):

## ccusage in my group chats [00:00] I have a number of group chats with my friends who are developers and we were all like sharing our CC usage scorecards as like bragging rights in the chat and I was like in one chat I was the winner and then another chat my friend was like oh that's cute and showed me like $4,000 in usage. It's this weird like scorecard of like nerd cred of how much are you using this. How much are you building. I saw a tweet from somebody and he said like CC usage screenshot is the next generation of GitHub commit graph. So I I was so I was so happy to see that. How do you pronounce your name. Uh Neop. We can just jump right into it. I'm going to run my CC usage and you can tell me what I'm seeing here. Oh, you installed the CC usage. All right. Yes, I did. And I noticed maybe you could start there. Should someone install it or should they just run it uh remotely. ## ccusage hello world [01:00] I recommend to use a bunx. It's very faster. The recommended usage is bunx space CC usage. Yes, because because uh so I I release CC usage quite often. So you can run BX CC usage to face the latest one. So here's the report I get. So tell me what I'm seeing here. So this table is all about the cost. It's kind of like pay as you go plan or if you are in the max brand or prop how much how much cost you save. Everyone likes talking about money or everyone is talking about the bargain or something like that. For context on my end, I am on the $200 a month Cloud Max plan. Yeah. Um I was on the $100 a month max uh plan. And the reason I upgraded to 200 was primarily for Opus 4 usage. Okay. So what we're seeing is probably my last 3 weeks of usage and I've gotten about $1,200 worth of tokens out of this. So um what I noticed when I very first started using Cloud Code and what I think everybody noticed is how expensive it is. And I felt like I could rack up $40, $50 in a few hours. Um, and it was the it created this real anxiety for me of like, oh, is do I really want to use this and and do I how do I optimize it. And then when they rolled out the Cloud Max plans, it felt sort of like. ## Claude Max feels like christmas [02:30] Christmas because now you could just use Cloud Code for all the things. And then I was shocked when I first used CC usage to see how much I would have spent in tokens if I had been on metered building. I'm sure you're getting tagged on everybody's screenshots. Like what is the biggest what's the biggest number you've seen down here so far. I already saw like 8.7K per month. Wow. And he he's using CL in parallel every day and he only uses Opus. What are are some of the hidden features or or just the features that people might not necessarily know about. ## underappreciated ccusage features [03:10] Okay, so okay, you can hear the B XC usage does help. Got it. Yeah, you know there are a bunch of features. Awesome, right. Yeah. Yeah. Walk me through some of these. So when you hit CC usage, so the default command is daily, right. Right. So, let's go through the monthly. Okay. One. Okay. Yeah. So, you can you can type it monthly. And so, I'm going to do CC usage monthly. Yes. Like that. Got it. Yeah. So, you can see how much tokens you used in the last month and this month, right. Okay. Yeah. Yeah. So, you you you used a lot. It's all relative, I think. Where are those logs that you're reading. I'm guessing this is in my like claw directory in my home folder perhaps. So you can go to project directory projects. Yeah. Yep. Yep. So there are bunch of directories and you can choose your uh look at that favorite project and you can see some JSON L. Yeah. Yep. Yep. Yep. Oh, look at that. Oh, so cool. So it has the JSON L and that has everything that it does. And then this is also I I suppose when I run claw-res, this is what it's reloading, right. Yeah. Yeah. Yeah, definitely. Oh yeah. You can see here cache creation input tokens 24,000 input tokens for Oh, super super cool. Okay. Request ID and then you're going to when you get the response back, you're going to see the uh the tokens as well. That's super interesting. Yeah. Let's try the session one. Uh-huh. Oh, interesting. Yeah. So, so, so you can see how many you how many tokens you used in the specific projects. So, the main project I've been working on uh is this thing called YouTube track tracker. But I this last week I was experimenting a lot with work trees and trying to run cloud code in parallel. And so a lot of what we're seeing here are um branches for specific issues and the the work trees where I was trying to to have cloud code work in parallel. Interesting thing is that the cloud code uses cash prompt so much, right. Yes. So there are lots of cash tokens. What would be an example of the types of tokens that you're you suspect they're caching. I don't I I don't know everybody know about cash token prompt. Yeah, cash talker is a feature of code when you use. ## token caching [06:00] clo codes. So there are long conversations and uh and the previous conversation should be like duplicate of the last request, right. So they they see that okay we received the uh conversation before so we see this conversation as a cached one cash prompting is really tricky when content changed a little bit it's not cached one anymore I think uh they optimize how to use the cache prompting in the middle of June and also before the sonet 4 and opus 4 the uh length of The save time is like five minutes. After the phone, they save the cash for an hour. So this is another way for them to like optimize the cash use. It was just astounding to me that like input here for instance, let's just call it 50,000. Output tokens, let's just say it was 10 times that amount. Let's just say it was 500,000. And but then the the cash tokens are uh I'm sorry the total yeah the total cash read here or total tokens let's say total tokens here are 500 million. So so you're you're talking like the the output tokens are 1 1,000th of the total tokens. And so they're that basically like the cash is representing if I'm reading this right the cash is representing like 99.9% of the tokens that like that's pretty incredible. I think I think they reuse the code base as a cash token. I think Oh, interesting. I think at the end of May, so the algorithm is different. They send the they send the prompt first and they then send they send the code base I think but. ## how context helps Claude Code beat Cursor [08:00] they change the they optimize the algorithm first they send all code base and then add add the prompt at the end. So, so it increase the cost cache efficiency, right. That's interesting too about the code base because I think a lot of the Were you using cursor before you were using cloud code so much. No, no, no. You were never on cursor. I'm a big actually. Yeah. Yeah. Amazing. Well, I I think that a lot of folks were wondering when cloud code came out and and to today why it feels like you're getting such better code generation from cloud code than you do from cursor when even if you're using the cloud 4 models in cursor and I suspect that this huge amount of context and the caching has a lot to do with that, right. Like I just suspect that when you're working with claude code, enthropic is passing in a whole lot more context on every inference than what cursor is doing given the fact that you're paying cursor $20 a month and given the fact that you know for me at least I've I've spent $1,200 worth of tokens on uh uh on cloud code over the last few weeks. So and and another and also think this is my guess but I think I think they have their own document uh code base in their server. So before before we cannot generate fives. Yeah. So but we cannot deal with it but so right now we can deal with it and we can see there are lots of cash tokens. So I I think so this is my guess but they they they sent the documentation to the cloud code. It'd be cool to get answers from them someday on that. But uh it's just really fascinating how this view over the logs. ## claude code's 5 hour blocks [10:00] gives you a little more insight into some of the magic that's happening that makes cloud code feel so magical. Uh another command blocks. Blocks. Got it. Blocks. Yep. So yeah, this is a really cool feature. So one of our contributors worked on this. When you start using cloud code, so there's like there's a time range in five hours. And when you so when you consume a lot of tokens in the five hours, you cannot use clo anymore. This view can show you how the five block five hours blocks works. I like that. So that's really cool. Yeah. Yeah. So you can you can see Yeah. Tell me your thoughts on the table. I guess I have not since bumping up to the $200 a month plan. I have not hit that a lot. But I do have a couple friends who were trying to see how much they how much usage they could get out of either the $100 or the $20 a month plans. And this seems like this view would be very very useful to them. Yeah. Oh, you use $76 per block, right. Yeah. Yeah. 75. Yeah. Yeah. Yeah. Yeah. That's so Yeah. So 7. So right here. So on July 1st, I spent $75 in worth of tokens in five hours. So that's really And then yeah, if we go and the next block, I spent another $33. That's so interesting. I love that. What a great view. And then we can see actually this one here that I was working on right before we hopped on the call. So it's saying that block is still usage still still open right now. Yeah. So I think I think you're in active block session active block. So. ## ccusage's undocumented live view [12:00] you can you can use the last command. This is really magical. So so you last one is not individual sub command. So you can hit BX. Okay. CC usage uh blocks blocks blocks dash dash live live. Yeah. There we go. Uh oh, nice. Yeah. So, it's awesome. So, this is a live view and yeah, actually it's a buggy. So, I'm I'm fixing a lot actually, but you can see how many session you have or and also you can see the burn rate of tokens per blocks. So this is a really cool feature, right. I love that. And yeah, you can see the projection of the current blocks, right. For example. So I think I think it estimate that you you going to use $44 for this five hour session. Five hour block. Yeah. Yeah. Yeah. This would be so fun to have this up on a separate monitor. It's like you have this going on one monitor while you run your cloud code sessions in the other one to see how much more work you can do over the next few hours. Yeah. So my friend spread the terminal screen using T-Max and so always show. ## claude multi-agent in parallel [13:30] the live monitor. Are you running cloud in parallel at all. Yeah, I sometimes use like use cloud code in parallel using g work. I recently find the tool which provides great integration for uh git work squad you know that cloud squad okay I do not know that cloud squad integrates cloud code and t-max and g get work so it's really useful tool I this is the one you're talking about right yeah yeah yeah this one oh super interesting so so when so when we use we don't we don't tie I get the work work tree command anymore. Yeah. Right. Good. Okay. Yes. Cuz I I've been like I I wrote like a shell script to like try to spin up the work tree and then tear it down afterwards and then I'm still like running into I feel like merge conflicts. All like this sort of UI makes a whole lot more sense. Yes. For that. All right. I like that a lot. Okay. All right. I'm going to check that out afterwards. How did you build this in the initial version. I mean the 0.1 version I created only a couple of hours using cloud code. I remember the event hosted by Anthropic. I must be I I think it's on 21st of May actually and they announced the Sonet 4 and Opus 4 and I. ## vibecoding ccusage [15:00] was shocked the how smart the model is but Opus 4 and Sonet 4 is a game changer right so and Cloud's experience is really good. So I was I was really into it. I saw a Japanese blog how to calculate the cost at that time. So there is a log file of code. We have a property called cost USD. So at that time we can just uh sum up the cost USD and and calculate the total cost. It looks interesting. Why don't I create a new tool and why don't I try the new vibing style. So I I decided to create a CC usage and I didn't expect it goes seriously and it goes so viral. I noticed at the start of this you say that you're fetching the latest model pricing from light LLM. At the end of May we can calculate the cost easily by some of the cost USD properties but also deleted the property. Oh really. I was really shocked and yeah everyone in our community was so shocked. So the issue came up like I don't know 1.010 doesn't support cost USD anymore. We need to do we need to find alternative solutions. So I came up idea to like just calculate the cost by using the to consumed the token and the price table. I changed the spec in just four hours I think. Is there anything in particular that you are looking for help on with CC usage. I know you have a lot of contributors. Um yeah, some people ask me uh about Gemini. ## the ccusage community [17:00] CI but I don't know because Gemini CI provides the cost usage when you finish finish using Gemini. So I don't I don't think I created. So there are a lots of people uh started to creating something cool using CC usage, right. So like some so some people created the raycast extension. Yeah, you can see the CC usage result on not on the raycast window but also you can see on the menu bar, right. Oh, that's cool. So I would be able to see it right up here. Yeah. And also also I also another people is creating the UIs right. So uh like like dashboard or something and and I heard somebody started to create a leaderboard for CC. Yes. So this is this was funny. I noticed on the Claude AAI subreddit there were people posting their their CC usage and then you know I think I was surprised a little bit about how negative the comments some of the comments were but I guess it kind of makes sense right like it does feel like this $200 a month plan to get $1,200 of tokens is a great gift from Anthropic that probably can't last forever but almost certainly is not going to last forever. or if a bunch of people on the internet just are like, "How do I spend as many tokens as possible as quickly as possible so I can like get on top of the Reddit leaderboard?" Or this acts as this measure of conspicuous consumption slash nerdcred. But yeah, then there's also like all the environmental and wasteful concerns all wrapped up in that. And it's really interesting just all the feelings that uh that this tool evokes. I bet you were surprised by some of the reactions that folks had. So I saw another tweet and and he show the table and he see he saw the tokens and cost and he realized okay I worked so hard with clothing for for this m so I I want to cheer me up like that he said like that. So it was really heartwarming. I love that. I spent most of my, you know, the last couple years just building a lot of stuff with AI. And, you know, some days it feels like you're learning a lot and building a lot. Some days it feels like you spent a whole bunch of hours doing something and the code never worked. Of course, it's a imperfect metric, but it is really cool to look back and see, oh no, I really was spending time trying to learn how this thing works. There is something very real about that of it is proof that you've been using the tools and I think that all of us are really trying to figure out like what do these things mean and how do I build software better because of the new tools that we have today. Yeah. Yeah. Yeah. I think so. I think so. So since usage is not not only the font to but also they enhance enhance the pipe coders or the developers. I'm really confident to say that I I I'm really happy to involve this awesome tour and also and yeah so this is really important things so I'm I'm taking a lot lots of time if you're happy about my tours uh please sponsor me and uh if you sponsor me so the all income is not only for me but also uh my contributors I think you are the first uh GitHub open source project that I've ever sponsored. And it was uh for me it was like, man, this it just is such a fun project that helps you understand the usage of these tools and and helps you understand the value you're getting out of a Cloud Max plan. Um but also I think helps me stay accountable. when you sign up for the Claude Max plan, you almost like feel bad walking away from your machine because you feel like if it's not working, I'm losing value, right. And so I actually really love starting my day by looking at CC usage. So I really appreciate you creating this. I've had so much fun with it. My friends and I have had a lot of fun and it has sparked some really great conversations between us and ultimately I think is helping us get better at using uh cloud code. So thank you for this. Thank you so much. I think I think CC usage has changed my life. So I got I got a lot of attention. I had so many conversation towards not only C uh contributors but also like customers or users including you. Yeah. So I guess so before before your email I I saw your video and Yeah. Now I'm here and I'm talking with you and I can connect with lots of people. It's really fun and I'm I'm really honored to have this cool project. Oh man, it there's so much fun stuff happening right now and I think you just never know what thing you're going to make that is going to uh you know land and and excite the internet. Um and and it's just I I feel like there's just never been a better time to be a software developer. And you know, you've got this project now that I I don't even know. I know you're at three and a half thousand stars. I don't even know how many downloads or installs. What is it at right now. It's it's 90k. 90,000. Incredible, right. So, that's so cool. Like, what an amazing time uh to be able to to write code. So, thank you very much for for making it and thanks for uh hanging out with me here today. Yeah. Yeah. Thank you for having me.