Skip to main content

ccusage-viz

简体中文 · Usage guide · Design philosophy · Architecture · Versioning

PyPI Python License: GPL v3 CI

Alpha · 0.1.2 — interfaces may change before 1.0. See the roadmap for planned work.

ccusage-viz is an independent, unofficial terminal visualizer for ccusage token data. It turns ccusage command output into interactive terminal charts without creating a second usage database. ccusage is required for real data and is not bundled with this project.

Product scope

ccusage-viz focuses exclusively on token consumption and metrics derived from token consumption, such as observed tokens per minute (TPM). It does not provide session analytics, request counts, elapsed-time metrics, costs, pricing, balances, quotas, allowances, or other non-token account analytics.

This project is not affiliated with or endorsed by the ccusage project or its maintainers.

Dashboard presets

dashboard composes independently configured charts in one terminal. Start with the default overview:

ccuv dashboard wide

wide (default)

A balanced 2×2 overview of Timeline, Stack, Ranking, and Monitor panes.

Wide Dashboard preset: balanced 2×2 overview

narrow

A compact, vertically focused layout for a narrower terminal.

Narrow Dashboard preset: vertically focused compact layout

all

A broad gallery that keeps several representative pane forms visible at once.

All Dashboard preset: broad gallery of representative panes

spotlight-wide

Timeline receives the leading full-width row; the remaining panes follow below.

Spotlight-wide Dashboard preset: Timeline leads in a full-width row

spotlight-wide2

Timeline and Stack receive consecutive full-width rows before the smaller panes.

Spotlight-wide2 Dashboard preset: Timeline and Stack lead in consecutive full-width rows

When to use a standalone chart

Choose a standalone view when you need to focus on one question rather than an overview composed from multiple panes.

Timeline

Use Timeline for daily token trends, grouped by model, agent, or project:

ccuv timeline

The 14-day view makes recent daily movement easy to compare.

Timeline view: 14-day daily token trend

The 13-month view makes longer-term changes visible at a coarser scale.

Timeline view: 13-month long-range trend

Calendar

Use Calendar to scan a longer period for active days, streaks, and concentrated usage:

ccuv calendar

Calendar view: contribution heatmap with activity intensity

Stack

Use Stack to compare input, output, and cache-token composition over time:

ccuv stack --cache split

This view emphasizes the overall composition of token types.

Stack view: token composition over time

This variation separates cache reads from cache creation.

Stack view: cache reads versus cache creation

Ranking

Use Ranking to find the projects, models, or agents with the most tokens in a range:

ccuv ranking --by project

Ranking view: projects ordered by total tokens

Project attribution coverage

The compatibility baseline below was verified on macOS with ccusage 20.0.23. “Token totals” means ccusage reports the agent in unified usage data. “Historical project attribution” requires a stable, real project identity for each record.

Agent Token totals Historical project attribution Agent version ccusage version Evidence
Claude Code Verified Verified 2.1.278 20.0.23 claude daily --instances --json provides project records.
Codex Verified Verified 0.139.0 20.0.23 Uses ccusage cwd/project fields when present; otherwise resolves only matching local session_meta.cwd metadata.
OpenCode Verified Unsupported (verified) 1.17.20 20.0.23 Real session output has no project identity field.
Antigravity Verified Unsupported (verified) 2.0.10 20.0.23 Real projectPath values were the generic constant Antigravity, not workspaces.

Historical project views with OpenCode, Antigravity, or another unsupported agent show a warning and do not manufacture project rows; that agent's project usage may therefore be absent or incomplete. Default Name project aggregation only combines an unambiguous Claude–Codex pair; it never merges projects within one Agent and may use private parent segments only to disambiguate a shared basename. It does not prove those records came from one checkout. Use Exact project aggregation to keep every source identity separate.

To move an agent to Verified, include in the same change a sanitized, non-empty real-data fixture, parser/provider coverage, project-ranking end-to-end validation, reconciliation with unified daily token totals, and the exact tested agent plus ccusage version.

Monitor

Use Monitor for process-local throughput observed from repeated cumulative snapshots—not reconstructed hourly history:

ccuv monitor

An observed throughput window starts after a sampling baseline is established. Timeline views mark this Monitor invocation's start while it remains in the visible window, so time before the mark means unobserved rather than zero usage. The marker is a line at every density; its label is shown at full and compact density when space allows. Ranking and list presentations do not show it.

Monitor view: observed token throughput window

The grouped view ranks the selected dimension within the observed window.

Monitor view: grouped ranking

The list view provides process and item detail alongside the observation.

Monitor view: process and list detail

For commands, filters, controls, styles, and data semantics, see the usage guide. The architecture overview is intended for maintainers.

Install, update, and remove

Requires Python 3.11–3.13. ccuv is the short alias for ccusage-viz; both installed commands behave the same way.

From uv

Install the isolated command-line tool:

uv tool install ccusage-viz
ccuv --version

Update or remove it:

uv tool upgrade ccusage-viz
uv tool uninstall ccusage-viz

From pip

Use an activated virtual environment, then install or update the package:

python -m pip install --upgrade ccusage-viz
ccuv --version

Remove it from that environment:

python -m pip uninstall ccusage-viz

From source

Clone the repository and install an editable tool:

git clone https://github.com/Cookie-HOO/ccusage-viz.git
cd ccusage-viz
uv sync --all-groups
uv tool install -e .
ccuv --help

After pulling newer source, refresh or remove the editable tool:

uv tool install --reinstall -e .
uv tool uninstall ccusage-viz

Missing ccusage?

Real-data commands need ccusage on PATH (or an explicit --ccusage-bin). If the default command is missing in an interactive terminal, ccuv offers:

npm install -g ccusage

An empty Enter or y/Y confirms that installation. Any other input, Ctrl-C, or EOF cancels it. Demo mode, redirected/noninteractive runs, and custom --ccusage-bin runs never prompt or install automatically. Install ccusage manually when npm is unavailable.

Further reading

ccusage-viz is token-only and stateless: it does not analyze Agent transcripts, store a usage database, or calculate cost, quota, QPM, or rate-limit metrics. For Codex project attribution only, it may read the matching local session's session_meta.cwd; it never stores or displays session-log content. These documents answer the deeper questions:

Document What it answers
Usage guide How do I install, configure, compose, and adjust charts and Dashboards?
Design philosophy Which product boundaries, ownership rules, and presentation principles are intentional?
Architecture How do CLI routes, hosts, panes, providers, processing, and renderers fit together for maintainers?
Roadmap What is planned, deferred, or open for feedback?
Known issues Which intermittent ccusage problems are recognized, and how can I recover safely?

Report reproducible problems with the bug report form, or propose improvements through the feature request form.

Licensed under the GNU General Public License v3.0 only.

Metadata

Release files for ccusage-viz 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ccusage-viz 0.1.2
File Size Uploaded
ccusage_viz-0.1.2.tar.gz 1.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for ccusage-viz 0.1.2
File Interpreter ABI Platform
ccusage_viz-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 1.8 MB

Release files / ccusage_viz-0.1.2.tar.gz

Download URL ccusage_viz-0.1.2.tar.gz
Size 1.6 MB
Tags Source
SHA-256 checksum
How to use checksums
e8788bbef0be0f585ea3b03e4d6da3745439e69e82bce633f088082b3a1af4bc
BLAKE2b-256 checksum
How to use checksums
731c38594d420cc97d6055ebca324b7940fad01869724faac6f14abc0ab11430
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.

Transparency log

Release files / ccusage_viz-0.1.2-py3-none-any.whl

Download URL ccusage_viz-0.1.2-py3-none-any.whl
Size 186.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ed636167e8ca8bd08c2a07a53a29b06143c1269d3df03b04d389171000ec45ea
BLAKE2b-256 checksum
How to use checksums
3085379e9ffce0c72796f9e7cbcada415800fee74e7f93e6038dfc2f1d762252
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.

Transparency log

Release history Release notifications | RSS feed

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.3

2 release files

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page