When Cursor switched to a usage-based pricing model, my monthly bill shot up 700% because I rely heavily on Claude. To avoid repeated surprises, I designed and published a usage tracking tool that captures in real time the tokens consumed by Cursor and Claude Code, and prevents the budget from getting out of control.
The solution is a CLI written in Python and also packaged as a Node package that logs token usage in real time, syncs data with an admin dashboard in Django, and generates global model rankings based on community usage. The project is open source and designed to integrate with billing processes, alerts, and enterprise visualizations.
How it works: the agent monitors API calls, calculates the cost per token, sends metrics to a Django dashboard, and allows you to set thresholds to receive warnings before charges spike. It also exports data for analysis with Power BI and for business intelligence pipelines, facilitating data-driven decisions.
At Q2BSTUDIO, we are a custom software and application development company that helps organizations adopt artificial intelligence without compromising cost control. We offer custom software, AWS and Azure cloud services, cybersecurity, and business intelligence services. Our team implements AI solutions for companies, develops custom AI agents, and builds Power BI dashboards to visualize consumption and performance.
If you need to optimize spending on models, audit API usage, or integrate a monitoring system for your custom applications, we can help you adapt the tool to your infrastructure, include security controls, and deploy it in cloud environments. We also offer consulting to reduce inference costs and improve model performance in production.
Contact Q2BSTUDIO for an initial audit, custom software development, and implementation of AI agents and business intelligence pipelines. The tracker's public repository is available on GitHub and the package on npm for quick installation and to start controlling consumption from today.





