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.
AIVSS 5.8 · Medium
View MAESTRO 7-layer threat model →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
- 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