Website review
This review may include AI-generated content and is not individually verified. Domain, certificate and other facts come from the observed data on this page.
What is ccusage?
ccusage is a usage analysis tool for coding (agent) CLIs. It is designed to help you understand how these command-line coding agents are being used, with a focus on local data sources, cost analysis, and enhanced display of that usage information.
What it does
Based on the page content, ccusage emphasizes several capabilities:
- All sources by default – It aims to view all detected supported coding (agent) CLI usage by default, rather than requiring you to pick a single source first.
- Focused views – It offers ways to narrow in on specific usage rather than only a broad aggregate.
- Local data sources – It works with local data sources, which suggests it analyzes usage data that already exists on your machine rather than requiring a cloud account.
- Cost analysis – It includes cost analysis, so you can see the financial implications of your coding agent usage.
- Enhanced display – It provides an enhanced display for presenting that usage information.
Who it is for
This is most useful for developers and teams who rely on coding agent CLIs and want visibility into how much they are using them and what that usage costs. If you are trying to track down unexpected usage, compare costs across different coding agent CLIs, or simply understand your own patterns, a tool like ccusage is aimed at that kind of question.
A practical next step
If you want to see whether ccusage fits your setup, the most direct test is to run it in an environment where your coding agent CLI data already exists locally. Start with the default all-sources view to confirm it detects your supported CLIs, then move to a focused view and the cost analysis to see whether the numbers match your expectations. If it detects your sources and the cost figures are meaningful to you, it is likely worth keeping in your workflow.
How does ccusage calculate or estimate costs for my coding agent CLI usage?
ccusage estimates costs by reading local usage data that your coding agent CLIs already record, then applying per-model token pricing to the token counts it finds. The page presents cost analysis as one of its main views alongside source detection, focused views, local data sources and enhanced display, and it defaults to showing all detected supported CLIs at once rather than requiring you to pick one first.
In practice, that means the tool is a reporting layer, not a billing system: it does not intercept your API calls or query a provider account. It works from local data sources, so the accuracy of any cost figure depends on two things — how completely your CLI logs token usage, and how current the pricing used for each model is.
What typically drives the estimate
- Token counts per model. Input, output, and often cached or reasoning tokens are counted separately because they are priced differently.
- Model identification. Each model in the logs must map to a price. Unrecognized or newly released models are the most common source of wrong numbers.
- Time window. Cost views are usually scoped to a day, session, or project, so the same logs can yield very different totals depending on the range you select.
- Subscription vs. metered usage. If you pay a flat subscription rather than per token, a token-based estimate tells you what the usage would have cost, not what you were charged.
A concrete way to check it
Pick one day where you can see your provider's own usage dashboard, run ccusage for that same day, and compare totals per model. If the gap is small, trust the tool for trend-watching and budgeting. If one model is wildly off, that model's price mapping is the likely culprit — note it and treat its figures as relative rather than absolute.
For anyone comparing several agent CLIs, the "all sources by default" behavior is the genuinely useful part: you get one cost picture across tools instead of reconciling separate logs. Pair it with your provider's official billing page when a number needs to be exact.
Which coding agent CLIs and local data sources does ccusage support?
ccusage reads usage data from coding agent CLIs installed on your own machine, and by default it reports on every supported source it detects rather than making you pick one first. Its focused views exist to narrow that down when you want a single tool's numbers.
What the page indicates
- All sources by default: the tool aggregates every detected supported coding (agent) CLI, so a fresh run gives you a combined picture without configuration.
- Focused views: you can switch to an individual source when you want one CLI's usage isolated.
- Local data sources: usage is read from data already on your machine, not from a hosted account, so what you see depends on which CLIs you have actually used locally.
- Cost analysis: the output includes cost-oriented reporting alongside raw usage.
- Enhanced display: the presentation is built for readable terminal output rather than raw dumps.
The page does not enumerate specific CLI names in the evidence above, so treat "supported sources" as whatever your installation detects.
How to decide if it fits
If you run several agent CLIs side by side — say one for quick edits and another for long refactors — a default all-sources view answers "what am I spending overall" in one command, while focused views answer "which tool is driving this." That split matters most for people comparing tools or tracking a budget across a team.
A practical first step: run it once with no filters to see which sources it detects on your machine, then re-run with a focused view on the busiest one and compare the cost line against your own expectations. If a CLI you use daily never appears, that tells you its data isn't in a location ccusage reads.
For related agent tooling, see GitHub for project repositories and issue threads, and npm if you install CLI tools through Node.
How can I view usage from only one specific coding agent CLI instead of all sources?
Use ccusage’s “Focused Views” to limit the report to a single coding agent CLI. By default the tool shows “All Sources by Default,” combining every supported CLI it detects; focused views are the intended way to switch from that combined view to one source.
How to apply it in practice
- Start with the default all-sources report to confirm which CLIs are being detected.
- Switch to a focused view and select the one CLI you care about.
- Re-run or refresh the view after switching so the totals and cost analysis reflect only that source.
Why this matters
A combined report answers “what did I spend across all agent CLIs?” A focused view answers narrower questions: how much a single CLI is costing, how heavily it is used, or whether one tool is responsible for a spike. Cost analysis and enhanced display options are more useful once the source is narrowed, because averages and totals are no longer blended across tools.
A concrete scenario
Suppose you use two coding agent CLIs and your weekly total looks high. The all-sources view tells you the total but not the cause. A focused view on one CLI shows whether that tool alone accounts for most of the usage; repeating it for the other confirms the split.
Decision criterion
Use the all-sources default when you want an overall picture or are unsure what is installed. Use a focused view whenever you are comparing tools, debugging one tool’s behavior, or reporting usage for a single CLI.
For setup details and the exact focused-view command, see ccusage.
What setup or configuration is needed to run ccusage locally?
ccusage is a local usage-analysis tool for coding (agent) CLIs. Its page evidence describes it as reading local data sources and defaulting to "all sources" detection, so the intended setup is minimal: run it on the same machine where your agent CLI writes its usage data, rather than configuring a remote service or account first.
What that means in practice
- Local data sources: ccusage analyzes data already present on your machine, so the prerequisite is that the CLI you want to measure has been used at least once and has recorded usage locally.
- All sources by default: you don't need to pre-select a tool. It detects supported sources and shows all of them, which is convenient for a first run but can be noisy if you only care about one CLI.
- Focused views: if you want a narrower report, you switch to a focused view for a specific source rather than changing global configuration.
- Cost analysis and enhanced display: these are output/reporting features, not setup steps — they shape how results are presented once data is available.
A concrete first run
Install and run ccusage on your working machine, then compare the "all sources" output against a focused view for the one agent CLI you actually use. A developer juggling two or three agent CLIs benefits from the default aggregate; a developer tracking a single tool gets a cleaner, more actionable number from the focused view.
Decision criterion
If your usage data lives on a different machine, in a container that doesn't persist its data, or behind a hosted service, local analysis will under-report or show nothing. Check that data is being written locally before assuming a configuration problem.
For background on the CLI ecosystem this tool targets, see GitHub.
What does the enhanced display show compared to the default view?
The enhanced display adds visual structure and richer formatting to the same usage data you already see in the default view. The default view is deliberately plain: it lists all detected supported coding (agent) CLI usage across every source it finds. The enhanced display keeps that same underlying dataset but presents it with clearer grouping, highlighting, and layout so patterns are easier to scan at a glance.
What changes in practice
- Default view: an all-sources summary — everything detected is shown together, with no special emphasis.
- Enhanced display: the same numbers, but organized so cost and usage trends stand out rather than blending into a flat list.
- Focused views sit alongside these and let you narrow to a single source instead of viewing everything at once.
The practical difference is readability, not new data. If you are checking one number quickly, the default view is fine. If you are comparing several agent CLIs or reviewing spend over time, the enhanced display reduces the effort of spotting which source is driving usage.
How to decide
Use the default view when you want a fast, complete inventory of what ccusage has detected. Switch to the enhanced display when you are analyzing rather than just confirming — for example, when deciding whether one agent CLI is consuming a disproportionate share of your usage.
As a next step, run the default view once to confirm every source is being detected correctly, then compare it against the enhanced display to see whether the visual emphasis matches your actual priorities.
User reviews (0)