# ccusage/ccusage

npx ccusage

Repository: https://github.com/ccusage/ccusage
Canonical: https://ross.abutalabs.com/products/ccusage
Homepage: https://ccusage.com/
Language: Rust
License: NOASSERTION
License Family: other
Last push: 2026-08-26T18:13:55+00:00

## Health v2 (maintenance only)
Score: 81/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 99, release rhythm 86, longevity 32
- inputs: {"age_days": 461, "days_push": 7, "days_rel": 18, "gap_med": 0, "n_releases_24m": 134}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 18176, forks 808 (observed 2026-08-28T04:11:26.412524+00:00)

## What it is
ccusage is a fast local CLI that analyzes token usage and estimated costs from coding agent CLIs such as Claude Code, Codex, OpenCode, Gemini CLI, and many others by reading their local JSONL logs. It produces daily, weekly, monthly, and session-level reports with USD cost estimates, cache token accounting, JSON export, and offline pricing support.

## Use cases
- track how much I spend on Claude Code tokens per day
- estimate monthly cost of my coding agent usage
- analyze token usage across multiple AI coding CLIs
- export my LLM usage data as JSON
- view Claude Code usage without uploading logs
- check cache token costs for AI coding sessions
- monitor AI coding spend offline

## When to choose
- you use Claude Code, Codex, or similar coding agent CLIs and want local, private usage and cost analysis
- you need aggregated daily/weekly/monthly/session reports of token consumption
- you want JSON output for programmatic processing of usage data
- you need offline cost estimation with pre-cached model pricing

## When to avoid
- you need real-time usage dashboards or team-level spend management rather than local CLI reports
- your AI tool is not among the supported coding agent CLIs
- you need exact billing data from your provider rather than estimates from token counts and pricing

## Facets
- artifact type: cli-tool
- maturity: active
- function: cli, analytics, developer-tools
- domain: developer-tools, analytics, large-language-models
- platform: cli, cross-platform, windows
- tags: claude-code, token-usage, cost-tracking, llm-usage-analysis, coding-agents, l-logs, command-line, macos, linux

## Member repositories
- ccusage/ccusage (main) score 81

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:26.412524+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:02:07.875896+00:00, confidence not recorded.
  - readme: https://github.com/ccusage/ccusage (fetched 2026-08-28T04:11:26.412524+00:00, sha 44565c25ed84)
  - homepage: https://ccusage.com/ (fetched 2026-08-29T08:00:06.680334+00:00, sha 2750537b6626)
  - site_page: https://ccusage.com/guide/getting-started (fetched 2026-08-29T08:00:06.682887+00:00, sha e206e0ebc3fc)
  - site_page: https://ccusage.com/guide/cost-modes (fetched 2026-08-29T08:00:06.685046+00:00, sha e99fb6b5353e)
  - site_page: https://ccusage.com/guide/claude (fetched 2026-08-29T08:00:06.687113+00:00, sha ba68b3e0cc84)
- Data as of 2026-08-30T08:39:29.467469+00:00.
