How ccusage's Focused Views and Enhanced Display Work

Updated

ccusage is a usage analysis tool for coding (agent) CLIs. By default it shows usage from all detected supported sources, so the first thing you see is a combined picture rather than a single tool's numbers. Focused views let you narrow that default view down to a specific source or dimension, and enhanced display changes how the resulting usage data is presented so it is easier to read. Use focused views when the all-sources total is too coarse; use enhanced display when the numbers are correct but hard to scan.

Focused views: narrowing the default all-sources output

The site describes the default behavior as "All Sources by Default" — ccusage detects supported coding (agent) CLIs and aggregates their usage unless you ask for something narrower. Focused views are the mechanism for that narrowing.

In practice, a focused view means you are choosing one slice of the data instead of the whole set. The site groups this under "Focused Views" alongside "Local Data Sources," which indicates the tool reads usage from local data on your machine and that the focused view operates on those local sources.

What a focused view is for

  • Isolating one CLI. If you run more than one supported coding agent CLI, the default view mixes them. A focused view lets you look at a single source's usage.
  • Isolating one dimension. Rather than a single tool, you may want one aspect of usage across sources — the site lists "Cost Analysis" as a separate heading, so cost is one dimension you can examine on its own.
  • Avoiding a misleading total. A combined number can hide the fact that one source dominates. Focusing first, then comparing, gives a more honest read.

How to think about the workflow

  1. Start from the default. Run ccusage with no narrowing and note which sources are detected. The default view is your inventory.
  2. Pick the slice you need. Decide whether the question is "how much did this one CLI use" or "what did everything cost." Those map to different focused views.
  3. Read the focused result. The output now reflects only the selected source or dimension, so totals and per-item figures refer to that slice.

The site does not publish exact flag names or menu paths in the material available, so treat the specific command syntax as something to confirm against the tool's own documentation rather than guessing.

Enhanced display: making the same data readable

Enhanced display does not change what is measured — it changes how the measured usage is shown. The site lists "Enhanced Display" as its own heading, separate from the data-source and cost headings, which supports reading it as a presentation layer over the analysis.

What it improves

  • Scanability. Raw usage records are dense. An enhanced view typically groups, aligns, or summarizes so you can find the number you want without reading every row.
  • Comparison. When you are looking at a focused view, a clearer display makes differences between periods or sources visible at a glance.
  • Cost alongside usage. Because "Cost Analysis" is a distinct capability, an enhanced display is where usage and its cost are most usefully shown together.

How it pairs with focused views

Focused views decide what you see; enhanced display decides how you see it. The useful combination is: focus first to remove irrelevant sources, then read the enhanced output so the remaining data is legible. Doing it in the other order — enhanced display over an all-sources view — still works, but you are styling a larger, noisier set.

Choosing between them

Goal Use Why
See everything detected Default all-sources view No narrowing applied
Examine one CLI or one dimension Focused view Removes unrelated sources from the totals
Make a focused result easy to read Enhanced display Presentation layer over the same data
Understand cost specifically Focused view on cost + enhanced display Cost is a separate analysis dimension

Practical notes and limits

  • ccusage analyzes local data sources, so what you can focus on depends on which supported CLIs are installed and have usage data on your machine. An empty focused view usually means no local data for that source, not a broken view.
  • The available material does not specify pricing, account requirements, or login. Do not assume the tool is free or requires no account based on this page alone — check the site directly.
  • Because exact command syntax is not documented in the source material, verify flag names against ccusage's own help output before scripting anything around it.

If your question is "which sources can ccusage analyze," that is a separate, broader question than how the views work; the focused-view mechanism is what you use once you know the sources exist.