@huakunshen/ocusage
v0.0.0
Published
CLI tool to display per-session token usage statistics from OpenCode.
Readme
ocusage
A CLI tool to display per-session token usage statistics from OpenCode.
Installation
Using npx (npm)
npx @huakunshen/ocusageUsing bunx (Bun)
bunx @huakunshen/ocusageGlobal Installation
# npm
npm install -g @huakunshen/ocusage
# bun
bun install -g @huakunshen/ocusageUsage
Display token usage statistics in a formatted table:
ocusageOutput detailed data as JSON:
ocusage --jsonWrite JSON output to a file:
ocusage --json --output usage.jsonDevelopment
Install dependencies:
npm installRun the unit tests:
npm run testBuild the library:
npm run buildRequirements
- OpenCode must be running locally (the tool connects to the OpenCode SDK)
License
MIT
