Ccusage
lastmod 2026-02-12created 2026-02-121 edits
A CLI tool for analyzing Claude Code/Codex usage
About
- Built to quickly analyze token usage and costs for Claude Code and Codex
- Summarizes daily, monthly, and per-session usage from local JSONL logs and presents it visually
- Color table output with automatic responsive layout; JSON data export available
- Per-model tracking separates usage by model, such as Claude Opus and Sonnet
- Usage lookup by period, date range filtering
- Also supports monitoring usage per Claude billing cycle with 5-hour block reports
- Can show usage in real time in the Claude Code status line
- Built-in MCP (Model Context Protocol) server for real-time integration with external tools
- Grouping by project and usage comparison across multiple instances
- Runs immediately with just the npx ccusage@latest command, no installation needed
- Extension packages such as @ccusage/opencode, @ccusage/pi, and @ccusage/amp support usage analysis for various AI coding environments
- MIT License