Crypto News

Cursor’s New Pricing Blew My Budget, So I Built a Usage Tracker

In June, Cursor updated its pricing policy and introduced usage-based pricing. All pro users (including me) are now allotted $20 of Sonnet credits and other frontier models at the API price. After running out of allotment, you start paying for each request at API cost. This is a stark change from the seemingly unlimited usage I got before.

I now realize how expensive those requests are. About 3 days into July, I got a warning from Cursor that I would be switched to usage-based pricing (how did that happen so quickly??). I continued using the service as I normally would, unknowingly racking up a sizable bill. In July, I spent $131 total on Cursor, including subscription, so around a 700% increase from the previous month. This is mostly because I code almost solely with Claude, which accounts for around 93% of my tokens in July.

You may now be wondering how I’m so aware of the specific metrics around my vibe coding. The reason is that I was so shocked at the end of July that I decided to code my own tool that would track my usage for me and help me stay on top of my bill for both Claude Code and Cursor.

It is the first package I ever made and the first repo I’ve open-sourced. I coded it in Python (my language of choice, coming from a data science background). It functions just as a simple CLI tool that refreshes your live Cursor and Claude code usage every 5 minutes and displays it on your terminal.

The coolest part, though, is that it sends your data to a Django server and gives you a nice dashboard on my website, breaking down your daily usage by model so you can see where your money is going. You can see my usage so far this month in the chart below:

Seeing your token counts accumulating throughout the month will also come in handy for Claude Code when they start their new rate limiting. Soon, Anthropic will also be introducing weekly token rate limits to their max-tier ($200) subscribers, which means you may also need to start being aware of WTD token usage in order to avoid a surprise throttle.

I thought it would be fun to make some kind of model ranking. So, taking inspiration from Open Router’s ranking page, I created a leaderboard dashboard of my own. It works by pooling together the MTD token usage of everyone who uses my package and gives a breakdown of the most popular models and how much they make up of the global usage total. You can check that out at the link to my tool above.

Figuring out how to retrieve the data from Cursor was a struggle. In their API documentation, there is only mention of a usage data endpoint for teams, which doesn’t work for me as a solo dev. After almost giving up, I noticed that when I downloaded my usage data in CSV format. I could actually see my browser quickly redirect to an API. From other open source projects, I knew you could get your access token from a local SQLite database Cursor created on every user’s machine. So I just tried hitting that endpoint with my credentials from the DB, and I got back the CSV of my usage! It’s not in any documentation, so hopefully, Cursor doesn’t shut that down if they read this!

For Claude Code tracking, I leveraged another open-source project called ccusage and embedded it into my package. I simply run that tool like so:

# Build the command
            cmd = ["ccusage", command, "--json"]
            
            # Add date filters if provided
            if kwargs.get('since'):
                cmd.extend(["--since", kwargs['since']])
            if kwargs.get('until'):
                cmd.extend(["--until", kwargs['until']])
            
            # Add other options
            if kwargs.get('breakdown'):
                cmd.append("--breakdown")
            if kwargs.get('timezone'):
                cmd.extend(["--timezone", kwargs['timezone']])
            
            print(f"🔍 Running: {' '.join(cmd)}")
            
            # Run the command
            result = subprocess.run(
                cmd, 
                capture_output=True, 
                text=True,
                check=True,
                timeout=30
            )

I decided to publish it as a Node package so it would be easier for others to install, even if they don’t have Python set up. To do this, I compiled my Python code into a standalone binary and then wrapped that binary inside a Node.js package. Pretty neat!

It was a cool but also somewhat anxiety-provoking experience pushing a repo to GitHub and making it public. What if I accidentally push confidential keys or my code isn’t good? Eventually I got over it and just pushed it, hoping that it would help other people avoid the surprise I had at the end of July. If anyone here reading it decides to use it, I’d love to hear from you.

Cursor’s new pricing has driven me to start using Claude Code more heavily, as you can see above. I already have multiple more uses from it this month than last (I’m writing this on August 8th). I still find Cursor more reliable, though, so hopefully with my new tool, I am able to keep those vibe code costs in check and their free auto model continues to get better!

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Check Also
Close
Back to top button