ccstats-0.2.12 is not a library.
ccstats
Fast token usage statistics CLI for Claude Code, Codex, and more.
Installation
Homebrew (macOS/Linux)
Cargo binstall (prebuilt binary)
Cargo install (from source)
Shell script
|
Manual download
Download from GitHub Releases.
Usage
Claude Code
# Today's usage
# Daily breakdown
# Weekly summary
# Monthly summary
# By project
# By session
# 5-hour billing blocks
# With model breakdown
# JSON output
# Debug mode (timing info)
OpenAI Codex
# Today's Codex usage
# Daily Codex breakdown
# Weekly Codex summary
# By session
# With model breakdown
Common Options
# Bucket by timezone
# Locale-aware number formatting
# Filter by date
# Offline mode (use cached pricing)
# Compact output
# Hide cost column
Supported Data Sources
| Source | Directory | Features |
|---|---|---|
| Claude Code | ~/.claude/projects/ |
Projects, Billing Blocks, Deduplication |
| OpenAI Codex | ~/.codex/sessions/ |
Reasoning Tokens |
Architecture
See docs/ARCHITECTURE.md for:
- Adding new data sources
- Data flow and processing pipeline
- Caching mechanism
- Deduplication algorithm
License
MIT