{"_id":"@aundal/opencode-token-monsters","_rev":"4-c921d9a5eb09d4a47263c57df323b51c","name":"@aundal/opencode-token-monsters","dist-tags":{"latest":"0.1.5"},"versions":{"0.1.2":{"name":"@aundal/opencode-token-monsters","version":"0.1.2","keywords":["opencode","opencode-plugin","token-usage","tokens","tui"],"author":{"name":"aundal"},"license":"MIT","_id":"@aundal/opencode-token-monsters@0.1.2","maintainers":[{"name":"aundal","email":"aundal@gmail.com"}],"homepage":"https://github.com/aundal/opencode-token-monsters#readme","bugs":{"url":"https://github.com/aundal/opencode-token-monsters/issues"},"dist":{"shasum":"cad6f4f9c8199cbbeebb26e970d1bc97892328f7","tarball":"https://registry.npmjs.org/@aundal/opencode-token-monsters/-/opencode-token-monsters-0.1.2.tgz","fileCount":8,"integrity":"sha512-ciLDrjLnTYRO30ExxTRW7aso2E01TKmnyrxwWHj7tgIvLW9Kw8d6plBpsspVeN6sPdUi6H7TQ878azecqVBpXQ==","signatures":[{"sig":"MEUCIQCgtryNEKC+kgDpJXPulpZ/0uaTR+fh5KK+d1tTwJ70mwIgZIDwmI7vDV0YK44tD/pIBhmcJOYt3qQ1I/JDQOWvNKY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":42110},"main":"dist/server.js","type":"module","types":"dist/server.d.ts","exports":{".":{"types":"./dist/server.d.ts","import":"./dist/server.js","default":"./dist/server.js"},"./tui":{"types":"./dist/tui.d.ts","import":"./dist/tui.js","default":"./dist/tui.js"},"./server":{"types":"./dist/server.d.ts","import":"./dist/server.js","default":"./dist/server.js"}},"gitHead":"44600b463eef265fd003202b977444553d14fba4","scripts":{"build":"node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && bun build src/server.ts src/tui.tsx --outdir dist --target bun --external @opencode-ai/plugin --external @opentui/solid --external solid-js --external gpt-tokenizer && tsc --emitDeclarationOnly","prepack":"bun run build","typecheck":"tsc --noEmit","prepublishOnly":"bun run build"},"_npmUser":{"name":"aundal","email":"aundal@gmail.com"},"repository":{"url":"git+https://github.com/aundal/opencode-token-monsters.git","type":"git"},"_npmVersion":"11.8.0","description":"OpenCode plugin that shows Token Monsters token usage breakdowns in the TUI sidebar.","directories":{},"_nodeVersion":"24.13.1","dependencies":{"solid-js":"1.9.12","gpt-tokenizer":"^3.4.0","@opentui/solid":"0.4.0"},"_hasShrinkwrap":false,"devDependencies":{"bun-types":"^1.2.19","typescript":"^5.8.3","@types/node":"^24.0.7","@opencode-ai/plugin":"^1.4.7"},"peerDependencies":{"@opencode-ai/plugin":">=1.4.0"},"_npmOperationalInternal":{"tmp":"tmp/opencode-token-monsters_0.1.2_1783519337516_0.36782317832297595","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@aundal/opencode-token-monsters","version":"0.1.3","keywords":["opencode","opencode-plugin","token-usage","tokens","tui"],"author":{"name":"aundal"},"license":"MIT","_id":"@aundal/opencode-token-monsters@0.1.3","maintainers":[{"name":"aundal","email":"aundal@gmail.com"}],"homepage":"https://github.com/aundal/opencode-token-monsters#readme","bugs":{"url":"https://github.com/aundal/opencode-token-monsters/issues"},"dist":{"shasum":"cf43714739f31354acbdec0ee5bdb41a208c9468","tarball":"https://registry.npmjs.org/@aundal/opencode-token-monsters/-/opencode-token-monsters-0.1.3.tgz","fileCount":8,"integrity":"sha512-gw62fBBflwho8T59kYE4Zidgx0UHqohggIFm9tiIO1avHnWe85s6OSZ6jaRuuy4DWD55bo7FdfbE3fY/xrYwLw==","signatures":[{"sig":"MEQCIHyNJ1lbZM95UIaYt6v6kZUaS7/ZdVSq+LNK2vBpcNeZAiAT1JdRewPo0ojYL6c5EINqmtvnVBSUxrEEC6BiaA0KWw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":42478},"main":"dist/server.js","type":"module","types":"dist/server.d.ts","exports":{".":{"types":"./dist/server.d.ts","import":"./dist/server.js","default":"./dist/server.js"},"./tui":{"types":"./dist/tui.d.ts","import":"./dist/tui.js","default":"./dist/tui.js"},"./server":{"types":"./dist/server.d.ts","import":"./dist/server.js","default":"./dist/server.js"}},"gitHead":"909c4dcb3e2b0ea97f7d0bf1aa38166efac1d36b","scripts":{"build":"node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && bun build src/server.ts src/tui.tsx --outdir dist --target bun --external @opencode-ai/plugin --external @opentui/solid --external solid-js --external gpt-tokenizer && tsc --emitDeclarationOnly","prepack":"bun run build","typecheck":"tsc --noEmit","prepublishOnly":"bun run build"},"_npmUser":{"name":"aundal","email":"aundal@gmail.com"},"repository":{"url":"git+https://github.com/aundal/opencode-token-monsters.git","type":"git"},"_npmVersion":"11.8.0","description":"OpenCode plugin that shows Token Monsters token usage breakdowns in the TUI sidebar.","directories":{},"_nodeVersion":"24.13.1","dependencies":{"solid-js":"1.9.12","gpt-tokenizer":"^3.4.0","@opentui/solid":"0.4.0"},"_hasShrinkwrap":false,"devDependencies":{"bun-types":"^1.2.19","typescript":"^5.8.3","@types/node":"^24.0.7","@opencode-ai/plugin":"^1.4.7"},"peerDependencies":{"@opencode-ai/plugin":">=1.4.0"},"_npmOperationalInternal":{"tmp":"tmp/opencode-token-monsters_0.1.3_1783523032751_0.46905566880724847","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@aundal/opencode-token-monsters","version":"0.1.4","keywords":["opencode","opencode-plugin","token-usage","tokens","tui"],"author":{"name":"aundal"},"license":"MIT","_id":"@aundal/opencode-token-monsters@0.1.4","maintainers":[{"name":"aundal","email":"aundal@gmail.com"}],"homepage":"https://github.com/aundal/opencode-token-monsters#readme","bugs":{"url":"https://github.com/aundal/opencode-token-monsters/issues"},"dist":{"shasum":"94529016531fa113f9099cbf1d437e8096125ab0","tarball":"https://registry.npmjs.org/@aundal/opencode-token-monsters/-/opencode-token-monsters-0.1.4.tgz","fileCount":8,"integrity":"sha512-5w8CuvMHWMFDMdJRBFxSNgmoSc+PrvMfwPiNAATKPznKm7KG9RgFSfbKTdjU66dZherQwVc3/tDXnYrWranTJw==","signatures":[{"sig":"MEYCIQDKUVHf0phNhiGJ+Jii8yNXqsPV4c8WkFIVxPqHi7I/OgIhAIeXFMWQSdZuiZOUGcgwUZD+AFJilgwW1crAlU6PAs7Y","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":42468},"main":"dist/server.js","type":"module","types":"dist/server.d.ts","exports":{".":{"types":"./dist/server.d.ts","import":"./dist/server.js","default":"./dist/server.js"},"./tui":{"types":"./dist/tui.d.ts","import":"./dist/tui.js","default":"./dist/tui.js"},"./server":{"types":"./dist/server.d.ts","import":"./dist/server.js","default":"./dist/server.js"}},"gitHead":"909c4dcb3e2b0ea97f7d0bf1aa38166efac1d36b","scripts":{"build":"node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && bun build src/server.ts src/tui.tsx --outdir dist --target bun --external @opencode-ai/plugin --external @opentui/solid --external solid-js --external gpt-tokenizer && tsc --emitDeclarationOnly","prepack":"bun run build","typecheck":"tsc --noEmit","prepublishOnly":"bun run build"},"_npmUser":{"name":"aundal","email":"aundal@gmail.com"},"repository":{"url":"git+https://github.com/aundal/opencode-token-monsters.git","type":"git"},"_npmVersion":"11.8.0","description":"OpenCode plugin that shows Token Monsters token usage breakdowns in the TUI sidebar.","directories":{},"_nodeVersion":"24.13.1","dependencies":{"solid-js":"1.9.12","gpt-tokenizer":"^3.4.0","@opentui/solid":"0.4.0"},"_hasShrinkwrap":false,"devDependencies":{"bun-types":"^1.2.19","typescript":"^5.8.3","@types/node":"^24.0.7","@opencode-ai/plugin":"^1.4.7"},"peerDependencies":{"@opencode-ai/plugin":">=1.4.0"},"_npmOperationalInternal":{"tmp":"tmp/opencode-token-monsters_0.1.4_1783523540230_0.02395202518572903","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@aundal/opencode-token-monsters","version":"0.1.5","description":"OpenCode plugin that shows Token Monsters token usage breakdowns in the TUI sidebar.","author":{"name":"aundal"},"license":"MIT","type":"module","main":"dist/server.js","types":"dist/server.d.ts","exports":{".":{"types":"./dist/server.d.ts","import":"./dist/server.js","default":"./dist/server.js"},"./server":{"types":"./dist/server.d.ts","import":"./dist/server.js","default":"./dist/server.js"},"./tui":{"types":"./dist/tui.d.ts","import":"./dist/tui.js","default":"./dist/tui.js"}},"repository":{"type":"git","url":"git+https://github.com/aundal/opencode-token-monsters.git"},"homepage":"https://github.com/aundal/opencode-token-monsters#readme","bugs":{"url":"https://github.com/aundal/opencode-token-monsters/issues"},"scripts":{"build":"node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && bun build src/server.ts src/tui.tsx --outdir dist --target bun --external @opencode-ai/plugin --external @opentui/solid --external solid-js --external gpt-tokenizer && tsc --emitDeclarationOnly","prepack":"bun run build","prepublishOnly":"bun run build","typecheck":"tsc --noEmit"},"keywords":["opencode","opencode-plugin","token-usage","tokens","tui"],"dependencies":{"@opentui/solid":"0.4.0","gpt-tokenizer":"^3.4.0","solid-js":"1.9.12"},"devDependencies":{"@opencode-ai/plugin":"^1.4.7","bun-types":"^1.2.19","@types/node":"^24.0.7","typescript":"^5.8.3"},"peerDependencies":{"@opencode-ai/plugin":">=1.4.0"},"gitHead":"909c4dcb3e2b0ea97f7d0bf1aa38166efac1d36b","_id":"@aundal/opencode-token-monsters@0.1.5","_nodeVersion":"24.13.1","_npmVersion":"11.8.0","dist":{"integrity":"sha512-Ra10M83cmojWpTOLZyrY/a11YVbgvv7IQ61SHDnDNOQ54R3Xbz5oItC0UjygCiE456Y1n1Xy7rjUooICcPVpaA==","shasum":"a3889eca207012153bbdd3906e50ff9a55a194a3","tarball":"https://registry.npmjs.org/@aundal/opencode-token-monsters/-/opencode-token-monsters-0.1.5.tgz","fileCount":8,"unpackedSize":42470,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIE+Z7HjdhDHTG4KQ8Z3eZqT9386gf1b8m5xSPCSogbP9AiEA4dB7bWBa5AONWZTSr5nUPuamiVusuyyNdzRbJo2Xvms="}]},"_npmUser":{"name":"aundal","email":"aundal@gmail.com"},"directories":{},"maintainers":[{"name":"aundal","email":"aundal@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/opencode-token-monsters_0.1.5_1783523850163_0.37056197995086015"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-08T14:02:17.378Z","modified":"2026-07-08T15:17:30.397Z","0.1.2":"2026-07-08T14:02:17.663Z","0.1.3":"2026-07-08T15:03:52.897Z","0.1.4":"2026-07-08T15:12:20.363Z","0.1.5":"2026-07-08T15:17:30.296Z"},"bugs":{"url":"https://github.com/aundal/opencode-token-monsters/issues"},"author":{"name":"aundal"},"license":"MIT","homepage":"https://github.com/aundal/opencode-token-monsters#readme","keywords":["opencode","opencode-plugin","token-usage","tokens","tui"],"repository":{"type":"git","url":"git+https://github.com/aundal/opencode-token-monsters.git"},"description":"OpenCode plugin that shows Token Monsters token usage breakdowns in the TUI sidebar.","maintainers":[{"name":"aundal","email":"aundal@gmail.com"}],"readme":"# Token Monsters for OpenCode\n\nToken Monsters adds a token usage sidebar to OpenCode. It shows the current context size, cache hit percentage, session totals, current prompt totals, prompt/tool/file breakdowns, and tool-definition overhead.\n\nAll numbers are approximate and counted with `gpt-tokenizer` using the OpenAI o200k tokenizer. For Claude, Copilot, and other non-OpenAI models, treat the numbers as a ballpark.\n\n![Token Monsters sidebar screenshot](assets/screenshot.svg)\n\n## Install\n\nAdd the plugin to both OpenCode config files.\n\n`~/.config/opencode/opencode.json`\n\n```json\n{\n  \"$schema\": \"https://opencode.ai/config.json\",\n  \"plugin\": [\n    \"@aundal/opencode-token-monsters@latest\"\n  ]\n}\n```\n\nRestart OpenCode after saving. OpenCode installs npm plugins automatically at startup.\n\n`~/.config/opencode/tui.json`\n\n```json\n{\n  \"$schema\": \"https://opencode.ai/tui.json\",\n  \"plugin\": [\n    \"@aundal/opencode-token-monsters@latest\"\n  ]\n}\n```\n\n## Install with OpenCode\n\nPaste this prompt into OpenCode:\n\n```text\nInstall the OpenCode plugin @aundal/opencode-token-monsters@latest into my global opencode.json and tui.json plugin arrays. Preserve my existing config, validate config shapes against https://opencode.ai/config.json and https://opencode.ai/tui.json, and tell me to restart OpenCode when done.\n```\n\n## Usage\n\nToken Monsters appears in the session sidebar.\n\nUse `/tokenmonster` to hide or show the sidebar panel.\n\n## Views\n\n- `Session: Total` shows everything captured since the session started.\n- `Session: Aktuel` shows the last request only.\n- `View: Prompts` groups usage per prompt turn.\n- `View: Tools` aggregates tool and file usage.\n\n## Package\n\nThe package exports one OpenCode plugin module with both server and TUI hooks. The server hook writes token capture data, and the TUI hook renders the sidebar.\n\n## Development\n\n```sh\nbun install\nbun run build\nnpm pack\n```\n\n## Publish\n\n```sh\nnpm publish --access public\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}