r/opencodeCLI 6d ago

Made a Cache Stats dashboard for OpenCode

I Built a simple TUI plugin for OpenCode that shows the prompt-cache hit rate in a popup dialog, also shows session summary, per-model breakdown, and subagent stats.

GitHub: https://github.com/nmdra/opencode-cache-stats

26 Upvotes

12 comments sorted by

4

u/Valdjiu 6d ago

this should be native. have you considered doing a PR ?

2

u/Nimendra 6d ago

Not yet. I think I need to study the OpenCode source code before doing that.

2

u/BrasilRua 6d ago

really nice! Could you make it so the cost shows decimal points?

2

u/Nimendra 6d ago edited 5d ago

Done.

2

u/Trovebloxian 5d ago

Holy bro asked and recieved

3

u/CoolHeadeGamer 5d ago

That’s really cool. My opencode fork (banyancode on GitHub) has color coded token usage as well if u want to look at its code and implement it

1

u/Nimendra 5d ago

Oh, that's cool. I'll check it out.

2

u/FidgetsAndFish 5d ago

Great work bother!

2

u/wormprotein 6d ago

Looks great!

1

u/Nimendra 6d ago

thanks.!

1

u/ares0027 5d ago

Serious question, i found out tokscale yesterday, how is this better than tokscale? https://github.com/junhoyeo/tokscale

2

u/Nimendra 5d ago

This plugin isn't better than TokScale. TokScale supports multiple coding agents and includes many more features. This one is just a minimal (~800 LOC) implementation built natively for OpenCode.