Skip to content

Instantly share code, notes, and snippets.

@mimikun
Last active June 3, 2025 10:51
Show Gist options
  • Select an option

  • Save mimikun/f10f44ac8417d52904fd96c42d8e2d5e to your computer and use it in GitHub Desktop.

Select an option

Save mimikun/f10f44ac8417d52904fd96c42d8e2d5e to your computer and use it in GitHub Desktop.
claude code logs

Testing by claude v1.0.3

    ~                                                                                                   19:37:48 
❯ claude --version
1.0.3 (Claude Code)

    ~                                                                                                   19:37:54 
❯ ccusage

 ╭──────────────────────────────────────────╮
 │                                          │
 │  Claude Code Token Usage Report - Daily  │
 │                                          │
 ╰──────────────────────────────────────────╯

┌──────────────┬──────────────┬──────────────┬──────────────┬──────────────┬──────────────┬────────────┐
│ Date         │        Input │       Output │ Cache Create │   Cache Read │ Total Tokens │ Cost (USD) │
├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼────────────┤
│ 2025-06-02   │           21 │       15,069 │       52,969 │       73,599 │      141,658 │      $2.23 │
├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼────────────┤
│ 2025-05-31   │          101 │       13,440 │       40,587 │    1,100,644 │    1,154,772 │      $3.42 │
├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼────────────┤
│ 2025-05-29   │          133 │        4,845 │       70,432 │      339,621 │      415,031 │      $2.20 │
├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼────────────┤
│ 2025-05-27   │           66 │        4,819 │       37,787 │      263,362 │      306,034 │      $1.47 │
├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼────────────┤
│ 2025-05-26   │          441 │       10,899 │      164,354 │    1,328,898 │    1,504,592 │      $5.90 │
├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼────────────┤
│ ──────────── │ ──────────── │ ──────────── │ ──────────── │ ──────────── │ ──────────── │ ────────── │
├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼────────────┤
│ Total        │          762 │       49,072 │      366,129 │    3,106,124 │    3,522,087 │     $15.22 │
└──────────────┴──────────────┴──────────────┴──────────────┴──────────────┴──────────────┴────────────┘

Run verify-pricing.ts

setup

git clone https://github.com/ryoppippi/ccusage.git
cd ccusage
git checkout 91adb43
bun i
bun install v1.2.14 (6a363a38)

$ simple-git-hooks
[INFO] Successfully set the pre-commit with command: bun lint-staged
[INFO] Successfully set all git hooks

+ @biomejs/[email protected]
+ @types/[email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]

156 packages installed [1293.00ms]

Run verify-prising.ts

❯ bun ./verify-pricing.ts
Found 16 JSONL files to check

ℹ Fetching latest model pricing from LiteLLM...                                                    ccusage 7:45:06 PM
ℹ Loaded pricing for 1049 models                                                                   ccusage 7:45:06 PM
Loaded pricing for 1049 models

=== Verification Results ===

Total entries processed: 169
Entries with both costUSD and model: 169
Matches (within 0.1%): 169
Mismatches: 0

Match rate: 100.00%

=== Model Statistics ===

claude-opus-4-20250514:
  Total entries: 169
  Matches: 169 (100.0%)
  Mismatches: 0


=== Discrepancy Analysis ===

Cost ratio patterns (calculated/original):

Run index.ts

❯ bun ./index.ts
ℹ Fetching latest model pricing from LiteLLM...                                                    ccusage 7:45:25 PM
ℹ Loaded pricing for 1049 models                                                                   ccusage 7:45:25 PM

 ╭──────────────────────────────────────────╮
 │                                          │
 │  Claude Code Token Usage Report - Daily  │
 │                                          │
 ╰──────────────────────────────────────────╯

┌──────────────┬──────────────┬──────────────┬──────────────┬──────────────┬──────────────┬────────────┐
│ Date         │        Input │       Output │ Cache Create │   Cache Read │ Total Tokens │ Cost (USD) │
├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼────────────┤
│ 2025-06-02   │           21 │       15,069 │       52,969 │       73,599 │      141,658 │      $2.23 │
├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼────────────┤
│ 2025-05-31   │          101 │       13,440 │       40,587 │    1,100,644 │    1,154,772 │      $3.42 │
├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼────────────┤
│ 2025-05-29   │          133 │        4,845 │       70,432 │      339,621 │      415,031 │      $2.20 │
├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼────────────┤
│ 2025-05-27   │           66 │        4,819 │       37,787 │      263,362 │      306,034 │      $1.47 │
├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼────────────┤
│ 2025-05-26   │          441 │       10,899 │      164,354 │    1,328,898 │    1,504,592 │      $5.90 │
├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼────────────┤
│ ──────────── │ ──────────── │ ──────────── │ ──────────── │ ──────────── │ ──────────── │ ────────── │
├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼────────────┤
│ Total        │          762 │       49,072 │      366,129 │    3,106,124 │    3,522,087 │     $15.22 │
└──────────────┴──────────────┴──────────────┴──────────────┴──────────────┴──────────────┴────────────┘

Testing by claude v1.0.9

❯ claude --version
1.0.9 (Claude Code)

❯ ccusage

 ╭──────────────────────────────────────────╮
 │                                          │
 │  Claude Code Token Usage Report - Daily  │
 │                                          │
 ╰──────────────────────────────────────────╯

┌──────────────┬──────────────┬──────────────┬──────────────┬──────────────┬──────────────┬────────────┐
│ Date         │        Input │       Output │ Cache Create │   Cache Read │ Total Tokens │ Cost (USD) │
├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼────────────┤
│ 2025-06-02   │           21 │       15,069 │       52,969 │       73,599 │      141,658 │      $2.23 │
├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼────────────┤
│ 2025-05-31   │          101 │       13,440 │       40,587 │    1,100,644 │    1,154,772 │      $3.42 │
├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼────────────┤
│ 2025-05-29   │          133 │        4,845 │       70,432 │      339,621 │      415,031 │      $2.20 │
├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼────────────┤
│ 2025-05-27   │           66 │        4,819 │       37,787 │      263,362 │      306,034 │      $1.47 │
├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼────────────┤
│ 2025-05-26   │          441 │       10,899 │      164,354 │    1,328,898 │    1,504,592 │      $5.90 │
├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼────────────┤
│ ──────────── │ ──────────── │ ──────────── │ ──────────── │ ──────────── │ ──────────── │ ────────── │
├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼────────────┤
│ Total        │          762 │       49,072 │      366,129 │    3,106,124 │    3,522,087 │     $15.22 │
└──────────────┴──────────────┴──────────────┴──────────────┴──────────────┴──────────────┴────────────┘

Run verify-prising.ts

❯ bun ./verify-pricing.ts
Found 16 JSONL files to check

ℹ Fetching latest model pricing from LiteLLM...                                                    ccusage 7:50:55 PM
ℹ Loaded pricing for 1049 models                                                                   ccusage 7:50:55 PM
Loaded pricing for 1049 models

=== Verification Results ===

Total entries processed: 169
Entries with both costUSD and model: 169
Matches (within 0.1%): 169
Mismatches: 0

Match rate: 100.00%

=== Model Statistics ===

claude-opus-4-20250514:
  Total entries: 169
  Matches: 169 (100.0%)
  Mismatches: 0


=== Discrepancy Analysis ===

Cost ratio patterns (calculated/original):

Run index.ts

❯ bun ./index.ts
ℹ Fetching latest model pricing from LiteLLM...                                                    ccusage 7:51:14 PM
ℹ Loaded pricing for 1049 models                                                                   ccusage 7:51:14 PM

 ╭──────────────────────────────────────────╮
 │                                          │
 │  Claude Code Token Usage Report - Daily  │
 │                                          │
 ╰──────────────────────────────────────────╯

┌──────────────┬──────────────┬──────────────┬──────────────┬──────────────┬──────────────┬────────────┐
│ Date         │        Input │       Output │ Cache Create │   Cache Read │ Total Tokens │ Cost (USD) │
├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼────────────┤
│ 2025-06-02   │           21 │       15,069 │       52,969 │       73,599 │      141,658 │      $2.23 │
├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼────────────┤
│ 2025-05-31   │          101 │       13,440 │       40,587 │    1,100,644 │    1,154,772 │      $3.42 │
├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼────────────┤
│ 2025-05-29   │          133 │        4,845 │       70,432 │      339,621 │      415,031 │      $2.20 │
├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼────────────┤
│ 2025-05-27   │           66 │        4,819 │       37,787 │      263,362 │      306,034 │      $1.47 │
├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼────────────┤
│ 2025-05-26   │          441 │       10,899 │      164,354 │    1,328,898 │    1,504,592 │      $5.90 │
├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼────────────┤
│ ──────────── │ ──────────── │ ──────────── │ ──────────── │ ──────────── │ ──────────── │ ────────── │
├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼────────────┤
│ Total        │          762 │       49,072 │      366,129 │    3,106,124 │    3,522,087 │     $15.22 │
└──────────────┴──────────────┴──────────────┴──────────────┴──────────────┴──────────────┴────────────┘
@mimikun

mimikun commented Jun 3, 2025

Copy link
Copy Markdown
Author

old version 😢

❯ pnpm list -g
Legend: production dependency, optional only, dev only

/home/mimikun/.local/share/pnpm/global/5

dependencies:
@anthropic-ai/claude-code 1.0.9
ccusage 0.2.2
mcp-hub 3.3.0
repomix 0.3.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment