Developers leveraging artificial intelligence for coding now have a streamlined way to monitor their API expenses. A new open-source utility called ccusage has emerged to help programmers track exactly where their AI coding tokens—and by extension, their development budget—are going.
Available for free on GitHub, ccusage operates by converting local AI coding logs into transparent, easy-to-read reports detailing token consumption and associated costs.
The tool natively supports a variety of popular command-line AI coding assistants, including:
- Claude Code
- Codex
- Gemini CLI
Developers can break down their usage metrics through highly customizable timeframes. The utility allows users to view their token expenditure by the day, month, specific coding session, individual project, or even a rolling five-hour billing window.
To get started, developers can run the tool directly from their terminal using the command npx ccusage. By bringing much-needed visibility to hidden API expenditures, ccusage aims to prevent surprise billing and help engineers optimize their generative AI workflows.