Description
OpenCode TokenScope turns the telemetry that OpenCode stores for a session into a readable report on token usage, cache, context and cost. The project keeps recorded usage separate from local tokenization and explanatory estimates, so the output does not imply more precision than the source data supports. The recommended install is from npm, with a global install and an entry in opencode.json, and it adds a /tokenscope command under the OpenCode config folder. A tokenscope-config.json file controls report sections such as context breakdown, tool schema estimation, cache efficiency, subagent analysis, detailed subagent cost breakdown and skill analysis. Updates can be done with npm update or the install script with an update flag. The README also gives a curl install script as a second option. Developers who work on the project run the test suite with Bun, while the build and distribution checks use Node.js and npm. The project is under the MIT License, and support is through GitHub Issues and Discussions. It suits people who use OpenCode and want to see where their tokens and costs go.…
Highlights
- Token, cache, context and cost report for OpenCode sessions
- Recorded usage kept separate from estimates
- Configurable sections including subagent and skill analysis
- Install from npm or a script
- MIT licensed
Ratings & Reviews
No ratings yet
Be the first to rate Opencode Tokenscope.
People also visit
Opencode Tokenscope FAQ
What is TokenScope?
A plugin that turns OpenCode session telemetry into a report on token usage, cache, context and cost.
How do I install it?
The recommended way is a global npm install, then adding the plugin to opencode.json and creating the /tokenscope command file. The README also gives a curl install script.
Can I choose what the report includes?
Yes. A tokenscope-config.json file in the OpenCode config folder turns sections on or off, such as context breakdown, cache efficiency and skill analysis.
What license is it under?
MIT, according to the README. Support is through GitHub Issues and Discussions.
What are the best Opencode Tokenscope alternatives?
Popular alternatives to Opencode Tokenscope include Token Tracker, AI Token Monitor and CodeBurn. See all Opencode Tokenscope alternatives

