@DanKornas: AI coding-agent spend is easy to lose track of when usage is spread across tools. ccusage is a command-line tool for de…
Summary
ccusage is an open-source command-line tool that helps developers inspect token usage and costs from local coding-agent CLI data, offering daily/weekly/monthly reports, model breakdowns, and JSON export.
View Cached Full Text
Cached at: 07/31/26, 07:01 PM
AI coding-agent spend is easy to lose track of when usage is spread across tools.
ccusage is a command-line tool for developers who want to inspect token usage and costs from local coding-agent CLI data.
It helps you turn local data into daily, weekly, monthly, and session reports across detected sources, with JSON, date-range, and timezone options.
Key features: • Multi-agent reports – combines detected CLI sources in one report • Time-based views – groups usage by day, week, month, or session • Cost visibility – shows USD costs and can hide cost columns with –no-cost • Model breakdowns – tracks models and supports per-model cost breakdowns • Structured output – exports report data as JSON for other workflows
It’s open-source (MIT license).
Link in the reply
Similar Articles
@akshay_pachaar: https://x.com/akshay_pachaar/status/2053166970166772052
The article discusses a shift in AI agent tool usage from the 'MCP vs CLI' debate to 'Code Mode,' where agents write code to dynamically import tools, significantly reducing context window usage. It highlights Anthropic's approach and Cloudflare's implementation, demonstrating a 98.7% reduction in token consumption for specific tasks.
kenn-io/agentsview
agentsview is an open-source local tool for browsing, searching, and tracking costs across AI coding agents.
@yibie: Recommends this hardcore real-world test. An engineer tracked his coding agent session for a week and found that only 0.67% of tokens were spent on actual tasks—the remaining 99% all went to moving tool directories, skill descriptions, and system prompts. Work-to-overhead ratio 1:1…
An engineer tracked his coding agent's token usage over a week, finding that only 0.67% of tokens were spent on actual tasks, with 99% consumed by tool directories, skill descriptions, and system prompts. He provides optimization strategies, including shell output filtering which saved 46.9% of tokens.
@bcherny: In the next version of Claude Code: run /usage to see a breakdown of which Skills, Agents, MCPs, and Plugins are using …
Claude Code will soon add a /usage command to show token consumption by Skills, Agents, MCPs, and Plugins, first on CLI then Desktop.
I measured where my AI coding agents waste tokens, 42% was avoidable. Built a tool to catch it (Claude Code / Cursor / Codex)
The author measured token waste in AI coding agents and found 42% avoidable, then built a tool to catch it. The tool works with Claude Code, Cursor, and Codex.