monthly command aggregates your Claude Code usage by month, providing a high-level view of your token consumption and costs over extended periods.
Basic Usage
- Input and output tokens
- Cache creation and read tokens
- Total tokens consumed
- Total cost in USD
- Models used
Command Options
Filter by Date Range
Use--since and --until to filter results to a specific date range:
Dates must be in
YYYYMMDD format. For monthly reports, you typically use the first day of months (e.g., 20250101 for January 2025).Model Breakdown
See per-model costs within each month:JSON Output
Export data in JSON format:jq Integration
Process JSON output with jq for advanced analysis:Common Flags
Filter from date (YYYYMMDD format)
Filter until date (YYYYMMDD format)
Show per-model cost breakdown (default: false)
Output in JSON format (default: false)
Process JSON output with jq command (requires jq binary, implies —json)
Cost calculation mode:
auto (use pre-calculated if available), calculate (always calculate from tokens), display (always use pre-calculated)Timezone for date grouping (e.g., UTC, America/New_York, Asia/Tokyo). Default: system timezone
Locale for date/time formatting (e.g., en-US, ja-JP, de-DE). Default: en-US
Force compact mode for narrow displays
Use cached pricing data instead of fetching from API (default: false)
Show pricing mismatch information for debugging (default: false)
Examples
First Quarter 2025
Full Year with Model Breakdown
Top 3 Most Expensive Months
Export to CSV
Understanding Monthly Aggregation
Month Format
Months are displayed inYYYYMM format (e.g., 202503 for March 2025).
Timezone Considerations
Monthly aggregation respects the--timezone flag. Usage is grouped by month in the specified timezone:
Model Usage
ThemodelsUsed array shows all models used during the month. Use --breakdown to see per-model costs: