Skip to content

Commit 89f85d5

Browse files
Document --breakdown flag and model-specific usage breakdowns in README.
1 parent bc1484e commit 89f85d5

1 file changed

Lines changed: 52 additions & 18 deletions

File tree

‎README.md‎

Lines changed: 52 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ This tool helps you understand the value you're getting from your subscription b
4141
- 📊 **Daily Report**: View token usage and costs aggregated by date
4242
- 📅 **Monthly Report**: View token usage and costs aggregated by month
4343
- 💬 **Session Report**: View usage grouped by conversation sessions
44+
- 🤖 **Model Tracking**: See which Claude models you're using (Opus, Sonnet, etc.)
45+
- 📊 **Model Breakdown**: View per-model cost breakdown with `--breakdown` flag
4446
- 📅 **Date Filtering**: Filter reports by date range using `--since` and `--until`
4547
- 📁 **Custom Path**: Support for custom Claude data directory locations
4648
- 🎨 **Beautiful Output**: Colorful table-formatted display
@@ -141,6 +143,9 @@ ccusage daily --mode display # Always show pre-calculated costUSD values
141143
# Control sort order
142144
ccusage daily --order asc # Show oldest dates first
143145
ccusage daily --order desc # Show newest dates first (default)
146+
147+
# Show per-model cost breakdown
148+
ccusage daily --breakdown # Show cost breakdown by model (opus-4, sonnet-4, etc.)
144149
```
145150

146151
`ccusage` is an alias for `ccusage daily`, so you can run it without specifying the subcommand.
@@ -170,6 +175,9 @@ ccusage monthly --mode display # Always show pre-calculated costUSD values
170175
# Control sort order
171176
ccusage monthly --order asc # Show oldest months first
172177
ccusage monthly --order desc # Show newest months first (default)
178+
179+
# Show per-model cost breakdown
180+
ccusage monthly --breakdown # Show cost breakdown by model
173181
```
174182

175183
### Session Report
@@ -197,6 +205,9 @@ ccusage session --mode display # Always show pre-calculated costUSD values
197205
# Control sort order
198206
ccusage session --order asc # Show oldest sessions first
199207
ccusage session --order desc # Show newest sessions first (default)
208+
209+
# Show per-model cost breakdown
210+
ccusage session --breakdown # Show cost breakdown by model
200211
```
201212

202213
### Options
@@ -209,6 +220,7 @@ All commands support the following options:
209220
- `-j, --json`: Output results in JSON format instead of table
210221
- `-m, --mode <mode>`: Cost calculation mode: `auto` (default), `calculate`, or `display`
211222
- `-o, --order <order>`: Sort order: `desc` (newest first, default) or `asc` (oldest first).
223+
- `-b, --breakdown`: Show per-model cost breakdown (splits usage by Opus, Sonnet, etc.)
212224
- `-d, --debug`: Show pricing mismatch information for debugging
213225
- `--debug-samples <number>`: Number of sample discrepancies to show in debug output (default: 5)
214226
- `-h, --help`: Display help message
@@ -295,15 +307,37 @@ After adding this configuration, restart Claude Desktop. You'll then be able to
295307
│ │
296308
╰──────────────────────────────────────────╯
297309
298-
┌──────────────┬────────┬─────────┬──────────────┬────────────┬──────────────┬────────────┐
299-
│ Date │ Input │ Output │ Cache Create │ Cache Read │ Total Tokens │ Cost (USD) │
300-
├──────────────┼────────┼─────────┼──────────────┼────────────┼──────────────┼────────────┤
301-
│ 2025-05-30 │ 277 │ 31,456 │ 512 │ 1,024 │ 33,269 │ $17.58 │
302-
│ 2025-05-29 │ 959 │ 39,662 │ 256 │ 768 │ 41,645 │ $16.42 │
303-
│ 2025-05-28 │ 155 │ 21,693 │ 128 │ 512 │ 22,488 │ $8.36 │
304-
├──────────────┼────────┼─────────┼──────────────┼────────────┼──────────────┼────────────┤
305-
│ Total │ 11,174 │ 720,366 │ 896 │ 2,304 │ 734,740 │ $336.47 │
306-
└──────────────┴────────┴─────────┴──────────────┴────────────┴──────────────┴────────────┘
310+
┌──────────────┬──────────────────┬────────┬─────────┬──────────────┬────────────┬──────────────┬────────────┐
311+
│ Date │ Models │ Input │ Output │ Cache Create │ Cache Read │ Total Tokens │ Cost (USD) │
312+
├──────────────┼──────────────────┼────────┼─────────┼──────────────┼────────────┼──────────────┼────────────┤
313+
│ 2025-05-30 │ opus-4, sonnet-4 │ 277 │ 31,456 │ 512 │ 1,024 │ 33,269 │ $17.58 │
314+
│ 2025-05-29 │ sonnet-4 │ 959 │ 39,662 │ 256 │ 768 │ 41,645 │ $16.42 │
315+
│ 2025-05-28 │ opus-4 │ 155 │ 21,693 │ 128 │ 512 │ 22,488 │ $8.36 │
316+
├──────────────┼──────────────────┼────────┼─────────┼──────────────┼────────────┼──────────────┼────────────┤
317+
│ Total │ │ 11,174 │ 720,366 │ 896 │ 2,304 │ 734,740 │ $336.47 │
318+
└──────────────┴──────────────────┴────────┴─────────┴──────────────┴────────────┴──────────────┴────────────┘
319+
```
320+
321+
With `--breakdown` flag:
322+
323+
```
324+
╭──────────────────────────────────────────╮
325+
│ │
326+
│ Claude Code Token Usage Report - Daily │
327+
│ │
328+
╰──────────────────────────────────────────╯
329+
330+
┌──────────────┬──────────────────┬────────┬─────────┬──────────────┬────────────┬──────────────┬────────────┐
331+
│ Date │ Models │ Input │ Output │ Cache Create │ Cache Read │ Total Tokens │ Cost (USD) │
332+
├──────────────┼──────────────────┼────────┼─────────┼──────────────┼────────────┼──────────────┼────────────┤
333+
│ 2025-05-30 │ opus-4, sonnet-4 │ 277 │ 31,456 │ 512 │ 1,024 │ 33,269 │ $17.58 │
334+
├──────────────┼──────────────────┼────────┼─────────┼──────────────┼────────────┼──────────────┼────────────┤
335+
│ └─ opus-4 │ │ 100 │ 15,000 │ 256 │ 512 │ 15,868 │ $10.25 │
336+
├──────────────┼──────────────────┼────────┼─────────┼──────────────┼────────────┼──────────────┼────────────┤
337+
│ └─ sonnet-4│ │ 177 │ 16,456 │ 256 │ 512 │ 17,401 │ $7.33 │
338+
├──────────────┼──────────────────┼────────┼─────────┼──────────────┼────────────┼──────────────┼────────────┤
339+
│ Total │ │ 11,174 │ 720,366 │ 896 │ 2,304 │ 734,740 │ $336.47 │
340+
└──────────────┴──────────────────┴────────┴─────────┴──────────────┴────────────┴──────────────┴────────────┘
307341
```
308342

309343
### Session Report
@@ -315,15 +349,15 @@ After adding this configuration, restart Claude Desktop. You'll then be able to
315349
│ │
316350
╰───────────────────────────────────────────────╯
317351
318-
┌─────────────┬────────────┬────────┬─────────┬──────────────┬────────────┬──────────────┬────────────┬───────────────┐
319-
│ Project │ Session │ Input │ Output │ Cache Create │ Cache Read │ Total Tokens │ Cost (USD) │ Last Activity │
320-
├─────────────┼────────────┼────────┼─────────┼──────────────┼────────────┼──────────────┼────────────┼───────────────┤
321-
│ myproject │ session-1 │ 4,512 │ 350,846 │ 512 │ 1,024 │ 356,894 │ $156.40 │ 2025-05-24 │
322-
├─────────────┼────────────┼────────┼─────────┼──────────────┼────────────┼──────────────┼────────────┼───────────────┤
323-
│ myproject │ session-2 │ 2,775 │ 186,645 │ 256 │ 768 │ 190,444 │ $98.45 │ 2025-05-25 │
324-
├─────────────┼────────────┼────────┼─────────┼──────────────┼────────────┼──────────────┼────────────┼───────────────┤
325-
│ Total │ │ 11,174 │ 720,445 │ 768 │ 1,792 │ 734,179 │ $336.68 │ │
326-
└─────────────┴────────────┴────────┴─────────┴──────────────┴────────────┴──────────────┴────────────┴───────────────┘
352+
┌─────────────┬────────────┬──────────────────┬────────┬─────────┬──────────────┬────────────┬──────────────┬────────────┬───────────────┐
353+
│ Project │ Session │ Models │ Input │ Output │ Cache Create │ Cache Read │ Total Tokens │ Cost (USD) │ Last Activity │
354+
├─────────────┼────────────┼──────────────────┼────────┼─────────┼──────────────┼────────────┼──────────────┼────────────┼───────────────┤
355+
│ myproject │ session-1 │ opus-4, sonnet-4 │ 4,512 │ 350,846 │ 512 │ 1,024 │ 356,894 │ $156.40 │ 2025-05-24 │
356+
├─────────────┼────────────┼──────────────────┼────────┼─────────┼──────────────┼────────────┼──────────────┼────────────┼───────────────┤
357+
│ myproject │ session-2 │ sonnet-4 │ 2,775 │ 186,645 │ 256 │ 768 │ 190,444 │ $98.45 │ 2025-05-25 │
358+
├─────────────┼────────────┼──────────────────┼────────┼─────────┼──────────────┼────────────┼──────────────┼────────────┼───────────────┤
359+
│ Total │ │ │ 11,174 │ 720,445 │ 768 │ 1,792 │ 734,179 │ $336.68 │ │
360+
└─────────────┴────────────┴──────────────────┴────────┴─────────┴──────────────┴────────────┴──────────────┴────────────┴───────────────┘
327361
```
328362

329363
## Requirements

0 commit comments

Comments
 (0)