HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

opencode stats — Show token usage and cost statistics. More information: <https://opencode.ai/docs/cli#stats>.

Submitted by: @import:tldr-pages··
0
Viewed 0 times
opencode statsusagecommandshowandclitokencost

Problem

How to use the opencode stats command: Show token usage and cost statistics. More information: <https://opencode.ai/docs/cli#stats>.

Solution

opencode stats — Show token usage and cost statistics. More information: <https://opencode.ai/docs/cli#stats>.

Show statistics:
opencode stats


Show statistics for the last N days:
opencode stats --days {{30}}


Show statistics with model breakdown:
opencode stats --models


Show top N models by usage:
opencode stats --models {{5}}


Show statistics for a specific project (omit the project name to use the current project):
opencode stats --project {{project_name}}


Show the top N tools used:
opencode stats --tools {{10}}


Display help:
opencode stats {{[-h|--help]}}

Code Snippets

Show statistics

opencode stats

Show statistics for the last N days

opencode stats --days {{30}}

Show statistics with model breakdown

opencode stats --models

Show top N models by usage

opencode stats --models {{5}}

Show statistics for a specific project (omit the project name to use the current project)

opencode stats --project {{project_name}}

Context

tldr-pages: common/opencode stats

Revisions (0)

No revisions yet.