Token Battle

INTEGRATION

ccusage to Token Battle

Token Battle supports ccusage monthly JSON as the official ranking import family. Export Claude Code, Codex CLI, or Gemini CLI usage through ccusage, preview normalized totals, submit the result, and share your monthly AI coding cost rank.

Generate an import file

Claude Codeccusage-claude
(f=ccusage-claude.json; i=1; while [ -e "$f" ]; do f="ccusage-claude-$(printf '%02d' "$i").json"; i=$((i+1)); done; ccusage claude monthly --json > "$f"; echo "saved to $f")
Codex CLIccusage-codex
(f=ccusage-codex.json; i=1; while [ -e "$f" ]; do f="ccusage-codex-$(printf '%02d' "$i").json"; i=$((i+1)); done; ccusage codex monthly --json > "$f"; echo "saved to $f")
Gemini CLIccusage-gemini
(f=ccusage-gemini.json; i=1; while [ -e "$f" ]; do f="ccusage-gemini-$(printf '%02d' "$i").json"; i=$((i+1)); done; ccusage gemini monthly --json > "$f"; echo "saved to $f")

Upload the generated JSON from the Token Battle dashboard, or submit it with the Token Battle CLI. Official Claude Code and Codex direct exports are preview/diagnostic candidates, but they are not ranking-eligible in this leaderboard.

Security & Privacy

Token Battle parses ccusage monthly JSON on the server, normalizes it into ranking totals, and does not permanently store the original raw JSON.

What data is uploaded?

Monthly totals, token counts, model names/counts, source slug, and the period used for ranking.

What is the ranking metric?

The default public leaderboard ranks monthly total cost in USD.

Can I preview first?

Yes. The dashboard previews normalized values before you submit to battle.