ccusage
CLI tool that analyzes Claude Code / Codex token usage and cost from local JSONL logs; ships a statusline hook.
🛡️ AgentReady threat assessment
MAESTRO 7-layer threat model + OWASP AIVSS risk score for ccusage, derived from its capabilities.
These scores are auto-generated from public information (the agent's own listing, docs, and repository) using the canonical OWASP AIVSS formula and the MAESTRO framework — an estimate for guidance, not a penetration test, audit, or certification. See the scoring methodology — every score is re-derived by the same automated method as an agent's public evidence changes.
Overview
ccusage reads local Claude Code JSONL usage logs and reports daily, weekly, monthly, session, and 5-hour-block token usage and cost. It exposes a `ccusage statusline` command designed to be wired into Claude Code's statusLine hook, and is commonly embedded in other statusline plugins. Its surface is a locally-run script fed by hook input reading the session transcript.
Key features and capabilities
- Daily/weekly/monthly/session usage reports
- 5-hour billing-window blocks tracking
- Claude Code statusline hook integration
- Reads local JSONL transcripts, no API key
Use cases
- Track Claude Code token spend and cost
- Show live usage/cost in the statusline