viberank
Back to Blog

How to Track OpenAI Codex Token Usage — and Join the Codex Leaderboard

July 24, 20266 min read

OpenAI's Codex CLI doesn't ship a usage dashboard, but it logs everything you need locally. This guide shows how to turn those logs into daily token counts and dollar figures with ccusage, what the numbers actually mean, and how to stack yours against the 190+ developers tracking Codex on the public Codex leaderboard.

Reading your Codex usage with ccusage

Codex CLI writes each session as JSONL under ~/.codex (or wherever CODEX_HOME points). ccusage parses those files, diffs the per-turn token counters, and rolls everything up into daily and monthly reports with API-equivalent costs:

npx ccusage@latest daily# per-day tokens + cost, all agents
npx ccusage@latest monthly# monthly rollup

The same command covers Claude Code, Gemini CLI, Copilot CLI and OpenCode, so if you bounce between agents you get one combined view instead of four dashboards. For a deeper comparison of how the big three stack up on cost, see Codex vs Claude Code vs Gemini CLI.

What the numbers mean (and why they look huge)

Agentic coding resends context on every turn — system prompt, file contents, tool output — so daily token counts in the tens or hundreds of millions are normal for heavy users. The saving grace is prompt caching: across all usage tracked on Viberank, roughly 95% of tokens are cache reads billed at a fraction of the input price. That's also why ccusage reports API-equivalent cost: if you're on a ChatGPT plan your marginal cost is $0, and the number tells you what your plan is actually worth — many heavy Codex users clear their subscription price in value within days.

The Codex leaderboard

196 developers currently track Codex usage on Viberank, alongside 990+ on Claude Code and 76 on Gemini CLI. The Codex board filters the global leaderboard to submissions that include Codex, ranked by API-equivalent spend and tokens; every profile breaks usage down per model and per tool, with an activity heatmap and streaks. If you're into tokenmaxxing, this is the scoreboard.

Join in one command

npx viberank-cli

It runs ccusage locally, submits only the usage totals (never your code or prompts), and links the submission to your GitHub handle — sign in on the site for a verified badge. Spending too much? Start with 9 ways to cut your AI coding bill.

Codex usage FAQ

How do I check my OpenAI Codex token usage?

Codex CLI writes session logs as JSONL under ~/.codex. Run npx ccusage@latest daily to parse them into per-day token counts and API-equivalent costs, alongside any other coding agents you use.

Does Codex usage tracked this way match my OpenAI bill?

Not exactly. ccusage computes API-equivalent cost from model list prices. If you use Codex through a ChatGPT plan, you don't pay per token — the number tells you what your usage would cost at API prices, which is the fairest way to compare across tools and plans.

Is there a public leaderboard for Codex usage?

Yes — Viberank ranks developers by real usage across Codex, Claude Code, Gemini CLI and more, with a Codex-only view at viberank.app/tool/codex. Run npx viberank-cli to join.

Why does Codex burn tokens so fast?

Agentic sessions resend context every turn: system prompt, file contents, tool results. Most of that is prompt-cache reads billed at a fraction of input price, so a big token number is usually a much smaller bill.