How to Check Your OpenCode Usage
The short answer: OpenCode core has no built-in usage command — but it logs every session locally, and npx ccusage@latest daily turns those logs into per-day token counts and costs in one command. Here's that route, the dashboard alternatives, and how to see where your burn ranks.
The one-command answer: ccusage
npx ccusage@latest daily# per-day tokens + cost, OpenCode includednpx ccusage@latest monthly# monthly rollupccusage reads OpenCode's session storage and computes tokens and costs from model list prices (via LiteLLM's pricing data), with subagent sessions included. Nothing is uploaded — it's all computed from your local files. And because the same command covers Claude Code, Codex, Gemini CLI and Copilot, you get one combined report across your whole agent stack.
Where OpenCode keeps the data
OpenCode writes message-level records — model identifiers and per-turn input/output token usage — under ~/.local/share/opencode/storage/message/. That's what ccusage parses. It also means your usage history lives (and dies) with that directory: wipe the machine, lose the history — one more reason to snapshot it somewhere (below).
Prefer a live view over a report? Two community tools read the same data: the opencode-stats terminal dashboard (totals, models, activity heatmap) and the TokenScope plugin, which adds a /tokenscope command inside OpenCode for per-session breakdowns.
Why cost tracking matters more on OpenCode
OpenCode is bring-your-own-provider. If you plug in an API key, the ccusage number is close to your actual bill — not the theoretical "API-equivalent" figure subscription users see. If you route through a Claude or ChatGPT plan instead, the number tells you what that plan is saving you. Either way, agentic sessions resend context every turn, so token counts look enormous; on Viberank's 11T+ tracked tokens, ~95% are cheap prompt-cache reads, which is why a scary token count usually maps to a much smaller bill.
Rank it: the OpenCode leaderboard
Once you can measure it, the next question is "is that a lot?" One command puts your totals on the public OpenCode leaderboard — code and prompts never leave your machine:
npx viberank-cliYour profile charts daily spend, tokens, models, and streaks across every tool ccusage tracks — and it doubles as the off-machine snapshot of your usage history. Curious how OpenCode stacks up against the big agents? See Claude Code vs OpenCode or Codex vs OpenCode on live data.
OpenCode usage FAQ
How do I check my OpenCode token usage?
Run npx ccusage@latest daily in your terminal. It reads OpenCode's local session storage (~/.local/share/opencode/storage/message/) and reports per-day token counts and estimated costs, alongside any other coding agents you use. OpenCode core has no built-in usage command.
Does OpenCode have a built-in /usage or /status command?
No — unlike Claude Code's /usage or Codex's /status, OpenCode core doesn't ship a usage meter. Community options fill the gap: the ccusage CLI for daily/monthly reports, the opencode-stats terminal dashboard, and the TokenScope plugin for per-session breakdowns.
How is OpenCode cost calculated?
From token counts times model list prices (ccusage uses LiteLLM's pricing data). Because OpenCode is bring-your-own-provider, this is close to your real bill if you pay per token with an API key — or an API-equivalent value if you route through a Claude or ChatGPT subscription.
Is there an OpenCode leaderboard?
Yes — Viberank tracks OpenCode usage submitted by developers via ccusage, with a dedicated board at viberank.app/tool/opencode. Run npx viberank-cli to add yours; only usage totals are submitted, never code or prompts.