
ccusage

Fast local CLI to track tokens and estimated costs across Claude Code, Codex, and 12+ other coding agents. No data upload. Cache support. Offline mode.
Editor's Verdict
Key Takeaways
- All Sources by Default
- Focused Views
- Local Data Sources
- Cost Analysis
In-Depth Review: What is ccusage?
ccusage is a fast, local CLI tool that monitors token usage and cost estimates across 15+ popular coding agent CLIs, including Claude Code, Codex, OpenCode, and more. It reads usage logs directly from your machine—no data ever leaves your system. Features include cost analysis with cache token accounting, responsive terminal tables, JSON export, and offline mode with pre-cached pricing. Ideal for developers who want real-time visibility into their AI coding expenses without compromising privacy.
Core Features
All Sources by Default
View all detected supported coding agent CLI usage by default, including Claude Code, Codex, OpenCode, and many more.
Focused Views
Start with all detected CLIs, then narrow the same usage views to one source when needed.
Local Data Sources
Reads local usage logs from multiple coding CLIs without uploading your data.
Cost Analysis
Estimate USD spend from token counts and model pricing, with cache token accounting where available.
Enhanced Display
Responsive terminal tables stay readable across wide and narrow terminals.
JSON Output
Export data in structured JSON format for programmatic use.
Claude Code Features
Blocks and statusline remain separate because they depend on Claude-specific local data and hooks.
Cache Support
Tracks cache creation and cache read tokens separately.
Offline Mode
Use pre-cached pricing data without network connectivity.
Multiple Cost Modes
Supports auto, calculate, and display modes for accurate cost estimation.
Pricing
Open Source (Free)
- All sources by default
- Focused views
- Local data sources
- Cost analysis
- Enhanced display
- JSON output
- Claude Code features
- Cache support
- Offline mode
- Multiple cost calculation modes
Pros and Cons
Pros
- Open Source & FreeReleased under the MIT License, completely free to use and modify.
- Broad CLI SupportSupports 15+ coding agent CLIs including Claude Code, Codex, OpenCode, and more.
- Privacy-FirstAll data is read locally without uploading to any external server.
- Accurate Cost EstimationProvides detailed token and cost analysis with cache token accounting and multiple calculation modes.
- Offline CapableWorks offline with pre-cached pricing data, no network required.
Cons
- Limited to Supported CLIsOnly works with the specific coding agent CLIs listed; custom or lesser-known CLIs are not supported.
- Requires Local LogsDepends on local usage logs being present; no cloud or remote data aggregation.
- Claude Code Default RetentionClaude Code only retains logs for 30 days by default, limiting historical analysis unless configured otherwise.
- Claude-Only Advanced FeaturesBlocks and statusline features are exclusive to Claude Code data, not available for other sources.
- No Cloud Sync or SharingNo built-in cloud sync or team sharing capabilities; output is local only.
Use Cases & Recommended Professions
Software Engineer→ View Toolkit
Tracks token usage and costs when using AI coding assistants to optimize spending.
AI/ML Engineer→ View Toolkit
Monitors API costs and token consumption across multiple AI models and coding agents.
DevOps Engineer→ View Toolkit
Analyzes usage patterns and cost trends for AI-powered development tools in CI/CD pipelines.
Data Scientist→ View Toolkit
Evaluates token efficiency and pricing for data analysis tasks using coding agents.
Technical Project Manager→ View Toolkit
Oversees team spending on AI coding tools and ensures cost-effective usage.
Researcher→ View Toolkit
Studies token cost patterns and pricing models across different AI coding assistants.
Frequently Asked Questions
Alternative AI Tools
View Detailed Comparison →ℹ️ Curation Disclosure: The overview and features of ccusage were synthesized using AI and fact-checked by our curation team to ensure accuracy.











