
ccusage
github.com/ccusage/ccusage- Category
- Developer Tools
- Rank
- No. 354Tools index
- Pricing
- Open Source
- Platform
- cli
- Type
- TOOL
- Builder
- ccusage
- GitHub
- 18.0k stars
- Latest release
- v20.0.20
- Added
- Jul 2, 2026
About
ccusage is a fast local CLI tool that tracks token usage and estimated costs across 15+ coding agent CLIs including Claude Code, Codex, Gemini CLI, GitHub Copilot CLI, and more. It reads local usage logs without uploading data, and generates daily, weekly, monthly, and session reports with cost breakdowns. Ideal for developers who want visibility into their AI coding assistant spend without sharing data externally.
What it does
ccusage turns scattered coding-agent records into comparable terminal views. It detects supported sources, normalizes their token and model data, groups activity by calendar period or conversation, and applies model pricing when recorded costs are unavailable. Reports can cover every detected agent together or isolate one source.
Why it's ranked here
This is a strong pick for individual developers using several coding agents. Unified reporting removes manual reconciliation, while date filters, timezones, per-model breakdowns, project grouping, and structured output make the results useful beyond a quick glance. Its read-only, local approach also suits sensitive work logs.
What's good
The default view combines every detected source, yet focused views retain source-specific controls. Cost modes distinguish recorded charges from token-based calculations, which makes comparisons more honest. Cache creation and read tokens remain separate. Structured output supports scripts and dashboards, while offline pricing, custom price overrides, and schema-validated configuration improve repeatability.
Tradeoffs
It only sees files on the current machine, so it cannot provide centralized team accounting. Tool-related API calls such as Web Search are excluded. Cost figures remain estimates and may differ from actual billing. Some investigated agents lack reliable token records and therefore remain unsupported. The Claude status-line integration is still beta and Claude-specific.
How to use it well
Use it as a regular personal spend check across multiple coding agents, then export structured data when trends need further analysis. Choose calculated costs for consistent historical comparisons and recorded costs for Claude billing checks. Set a timezone and shared pricing overrides for reproducible reports. Look elsewhere for organization-wide enforcement, alerts, or authoritative invoices.
Technical notes+
The root package.json defines a private ESM pnpm workspace spanning apps/*, docs, and packages/*. README.md documents npm-style package runners, global installs, and a Nix app and package. docs/guide/cost-modes.md describes three cost strategies and LiteLLM-backed token calculations, while docs/guide/config-files.md documents layered JSON configuration, schema validation, offline snapshots, and per-model overrides. docs/guide/json-output.md specifies structured output for unified, daily, monthly, session, and block reports. docs/README.md identifies the documentation site as VitePress hosted on Cloudflare.
Observed
- Interface
- Command-line tool with terminal tables and structured JSON output.
- Packaging
- Published for npm-style runners and global package managers; also exposed as a Nix app and package.
- Repository structure
- Private pnpm monorepo workspace containing application, documentation, and package directories.
- Configuration
- JSON configuration supports schema validation, layered defaults, source-specific settings, and model pricing overrides.
- Documentation stack
- VitePress documentation site hosted on Cloudflare.
- Data behavior
- Reads local usage files without modifying them and supports offline pricing data.
Read from README.md, package.json, docs/index.md, docs/AGENTS.md, docs/CLAUDE.md, docs/README.md, docs/guide/index.md, docs/guide/sponsors.md, docs/guide/cost-modes.md, docs/guide/statusline.md, docs/guide/all-reports.md, docs/guide/cli-options.md, docs/guide/json-output.md, docs/guide/config-files.md, docs/guide/installation.md.
What it can do
Generate token usage and cost reports by time period
Local usage logs from coding agent CLIs → Daily, weekly, monthly, or session reports with cost breakdowns
Aggregate usage data across multiple AI coding tools
Local log files from 15+ coding agent CLIs (Claude Code, Codex, Gemini CLI, GitHub Copilot CLI, etc.) → Unified token usage and cost summary across all tools
Filter usage reports by date range
Local usage logs and user-specified date range → Cost and token usage report scoped to the specified dates
Export usage reports as JSON
Local usage logs → Structured JSON file containing token usage and cost data
Calculate estimated costs with custom pricing overrides
Local usage logs and user-defined pricing rates → Cost estimates based on custom per-token pricing
Configure reports for a specific timezone
Local usage logs and timezone setting → Usage reports with timestamps and groupings adjusted to the specified timezone
Tags
Tech Stack
Media

Comments (0)
No comments yet
Indexed by a proprietary survey. Corrections welcome.