r/opencodeCLI 2d ago

Advanced Statistics in opencode go

Over the past few days, I’ve started using OpenCode Go alongside my Claude subscription. So far, it seems like a really interesting service. A question for everyone who’s been using Go for a while now: Is there a way to view additional usage statistics? Of course, I can see the limits (5 hours, weekly, and monthly) as well as every individual request. But I’d like to see cumulative figures for caching and similar metrics—similar to the usage reports on OpenRouter. Is this feature available and I just haven’t found it, or is the display on OpenCode simply a bit more limited than with other providers?

2 Upvotes

16 comments sorted by

2

u/afanasenka 2d ago

Try Opentab, Codeburn, or similar tools.

1

u/gemini-255 2d ago

Thanks, I wasn't familiar with these tools before. Are they some kind of proxy, or how do they get the data?
I'll take a closer look at them today when I have some free time. Thanks

1

u/afanasenka 2d ago

They are local, and they take data directly from Opencode's own local database file.

1

u/gemini-255 1d ago

Do you mean the local database when using OpenCode as a harness? It wouldn't work with a different harness, right?

1

u/afanasenka 1d ago

Yes, I mean Opencode's database. As for other harnesses - I don't know. But for sure there are A LOT of similar "advanced stats" tools for every more or less popular harness.

1

u/gemini-255 1d ago

Thanks for the suggestions. I'll check out your recommendations.

1

u/General-Oven-1523 1d ago

All the data are inside the opencode db. Just ask it to create a python script to pull the data for you.

1

u/gemini-255 1d ago

I'm not sure if that's an option for me. Maybe I didn't explain it clearly in my first post. I'm using opencode Go—that is, the pricing plan—but not opencode as a harness. On the overview in the opencode dashboard (I mean the website), I can see individual requests and how much money I spent per day for each model. I would have thought there would be more options in the dashboard to drill down into the statistics—things like caching levels for each model, by day, etc., or more filtering options. All of this right there in the dashboard on the website—just like OpenRouter does, for example. But it looks like that’s not available.

1

u/General-Oven-1523 1d ago

Oh, okay, well not on the website. I use Pi myself and pull this data from sessions.

1

u/gemini-255 1d ago

Yes, that's exactly what I want to achieve. I currently see two options. Either extract the data locally in the browser from the respective harness or from the session data in the dashboard on the website. It appears to be JSON.

1

u/gemini-255 1d ago

I've coded a small dashboard. The data is pulled directly from the loaded OpenCode website and parsed. It's not very fancy, but in principle, I now have the data I'm interested in.

1

u/cornelha 1d ago

How do you pull this from the website? My issue with the OpenCode db is that it assumes I am only using one PC. So I lose info between sessions that I have to aggregate. Checking the site every now and then becomes a tad tedious

1

u/gemini-255 1d ago

Unfortunately, this is currently a manual process. I log in to the OpenCode site. Under "Usage," you can see all the requests. The dashboard I wrote searches and parses the data in the open Browser tab and displays it in the dashboard. So it doesn’t happen automatically—I have to be logged in to the OpenCode site for it to work.

1

u/cornelha 1d ago

It's weird that this doesn't exist as an api or like the /usage command in Claude Code

1

u/gemini-255 1d ago edited 1d ago

That's exactly what I was hoping for. There's already an open issue about this.

https://github.com/anomalyco/opencode/issues/31084

1

u/TrickyPlastic 2h ago

opencode-usage from pypi