Here is how to check OpenCode usage: type opencode stats in a terminal for a quick total, or open UsageAtlas, a free and open-source desktop app, to see the same local data as a dashboard with daily history. Both read what OpenCode has already saved on your computer, so there is nothing to sign up for and nothing to configure first.
The steps below go from the fastest check to the most complete one.
Step 1: run opencode stats
Open a terminal on the machine where you use OpenCode and run:
opencode stats
According to the OpenCode CLI docs, this prints token usage and cost statistics for your OpenCode sessions. With no flags it covers all time.
Step 2: narrow it down with flags
The plain command answers "how much, ever". These flags answer the questions you probably have:
| You want to know | Command |
|---|---|
| Usage this week | opencode stats --days 7 |
| Which models you used most | opencode stats --models |
| Only the top three models | opencode stats --models 3 |
| Usage in the project you are in | opencode stats --project "" |
The docs also list --tools for the number of tools shown. Combine flags as needed, for example a week of one project with a model breakdown.
Step 3: look at individual sessions
If a total looks high, find the session behind it. opencode session list prints your sessions, and -n 10 limits it to the ten most recent. Inside the OpenCode interface, the /sessions command lists your sessions and lets you switch between them. To see exactly what happened in one of them, opencode export writes that session out as JSON.
Step 4: see it as a dashboard
The commands above are snapshots. You run them, read them, and they are gone. If you check usage often, a desktop view saves the typing.
UsageAtlas reads the same local OpenCode database and lays it out in three places:
- Today for the current day's tokens, requests and models.
- History for day-by-day usage, so you can compare this week with last.
- Insights for model share and the hours and weekdays you work most.
It also shows an estimated cost, built from token counts and model prices and labeled as an estimate unless OpenCode reports a figure itself.
To set it up, download UsageAtlas for Windows, macOS or Linux from usageatlas.com, install it on the computer that runs OpenCode, and open it. There is no OpenCode login and no account needed. If you also use Claude Code, Codex or Cursor, they can appear in the same view, and the tool filter brings you back to OpenCode alone.
Step 5: confirm the money with your providers
OpenCode connects to whichever model providers you set up, and each of them bills you directly. For the exact amount, open each provider's billing page. Treat the numbers from opencode stats and UsageAtlas as a guide to where tokens went, and the invoices as the final figure.
If the numbers look empty
Both methods read data from the computer you run them on. If you use OpenCode on a work laptop and check from a home desktop, you will see nothing, because the sessions live on the laptop. Run the command, or install the tracker, on the same machine where OpenCode runs. On Windows this works the same way as on macOS and Linux: the Windows build of UsageAtlas reads the OpenCode data already on that PC. If you are not sure where OpenCode keeps its data, opencode db path prints the location of its database.
Which method is right for you
- Once in a while:
opencode statswith--daysis enough. - Every day, or across several coding tools: UsageAtlas keeps the picture open without any commands.
- Paying the bill: the provider console, every time.
A note on privacy: UsageAtlas does not read your prompts or responses, and local tracking works without an account. Signing in with Google or GitHub is optional and only stores usage summaries so you can restore them on a new computer.