rtk-ai / rtk-ai/rtk

cc-economics: ccusage 20.0.20 JSON schema mismatch (missing field `month`)

Open
#4,063 3 comments 0 reactions 1 assignee View on GitHub

@dopaemon is already working on this.

Since Sep 14, 2026.

area:cli bug priority:high
Dominant language
Rust
Stars
81.1k
Forks
5.1k
Avg merge
4d 21h
Merged PRs (30d)
35

Description

What happened

rtk cc-economics fails when ccusage's monthly data is parsed:

❯ rtk cc-economics
[info] ccusage not installed globally, fetching via npx...
rtk: Failed to fetch ccusage monthly data: Failed to parse ccusage JSON output: Invalid JSON structure for monthly data: missing field `month` at line 39 column 5

Versions

  • rtk 0.42.1
  • ccusage 20.0.20 (fetched via npx, not installed globally)

Cause

ccusage's monthly JSON output shape appears to have changed in 20.0.20 — the month field rtk expects is missing/renamed. rtk's parser hasn't been updated to match.

Repro

  1. Ensure ccusage is not installed globally (rtk falls back to npx ccusage)
  2. Run rtk cc-economics
  3. Observe the parse failure above

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.