{"_id":"openrtk","name":"openrtk","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"openrtk","version":"0.1.0","description":"OpenCode plugin for RTK (Rust Token Killer) - reduces LLM token consumption by 60-90% on dev commands","main":"lib/index.js","types":"lib/index.d.ts","type":"module","scripts":{"build":"tsc","test":"bun test","prepublishOnly":"npm run build"},"keywords":["opencode","opencode-plugin","rtk","token-optimization","ai","llm"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/martins/openrtk.git"},"peerDependencies":{"@opencode-ai/plugin":"*"},"devDependencies":{"@opencode-ai/plugin":"*","typescript":"^5.0.0"},"gitHead":"99a67c0988f7222f960e6da31e01d5e8118640b6","_id":"openrtk@0.1.0","bugs":{"url":"https://github.com/martins/openrtk/issues"},"homepage":"https://github.com/martins/openrtk#readme","_nodeVersion":"25.7.0","_npmVersion":"11.11.0","dist":{"integrity":"sha512-hmCxVFLr1avDy0rdsTIFEMysKwXgzej3fmmQzM1d3nNAtThCsykKLCzPoHjTvGnp6DB3mLWlYvol+pycacn0vQ==","shasum":"dd82ce043db3494086cdd14ed3f27913cac553ab","tarball":"https://registry.npmjs.org/openrtk/-/openrtk-0.1.0.tgz","fileCount":7,"unpackedSize":11116,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIC191j3sZzGuGEQrnaaKqYXKBATrUY94768OXTJVlAGjAiEA/UXIGudcVg0dkRcwIrQial1JdJr8snxY6Kb8jB6Hm+4="}]},"_npmUser":{"name":"martinstannard","email":"martin@stannard.id.au"},"directories":{},"maintainers":[{"name":"martinstannard","email":"martin@stannard.id.au"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/openrtk_0.1.0_1773188060803_0.027180484776063052"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-11T00:14:20.803Z","0.1.0":"2026-03-11T00:14:20.945Z","modified":"2026-03-11T00:14:21.430Z"},"maintainers":[{"name":"martinstannard","email":"martin@stannard.id.au"}],"description":"OpenCode plugin for RTK (Rust Token Killer) - reduces LLM token consumption by 60-90% on dev commands","homepage":"https://github.com/martins/openrtk#readme","keywords":["opencode","opencode-plugin","rtk","token-optimization","ai","llm"],"repository":{"type":"git","url":"git+https://github.com/martins/openrtk.git"},"bugs":{"url":"https://github.com/martins/openrtk/issues"},"license":"MIT","readme":"# openrtk\n\nOpenCode plugin for [RTK](https://github.com/rtk-ai/rtk) (Rust Token Killer). Reduces LLM token consumption by 60-90% on common dev commands by transparently routing them through RTK's output compression.\n\nA lightweight OpenCode plugin that intercepts shell commands and pipes them through RTK for automatic output compression. The model sees full output while RTK handles token reduction behind the scenes — no changes needed to prompts or workflow.\n\n## Prerequisites\n\nInstall RTK:\n\n```bash\ncargo install rtk\n```\n\n## Installation\n\nAdd to your OpenCode config (`opencode.json` or `.opencode/config.json`):\n\n```json\n{\n  \"plugin\": [\"openrtk\"]\n}\n```\n\nOr copy `src/index.ts` directly into `.opencode/plugins/` for local use.\n\n## How it works\n\nThe plugin hooks into OpenCode's `tool.execute.before` event and rewrites shell commands to go through RTK before execution. This is fully transparent to the model.\n\n```\ngit status       ->  rtk git status       (72% savings)\ncargo test       ->  rtk cargo test       (80% savings)\ndocker ps        ->  rtk docker ps        (65% savings)\n```\n\n### Supported commands\n\n| Category | Commands |\n|----------|----------|\n| Git | status, diff, log, add, commit, push, pull, branch, fetch, stash, show |\n| GitHub CLI | pr, issue, run, api, release |\n| Rust | cargo test/build/clippy/check/install/fmt |\n| File ops | cat, grep, rg, ls, tree, find, diff |\n| JS/TS | vitest, npm test/run, tsc, eslint, prettier, playwright, prisma |\n| Containers | docker (compose/ps/images/logs/run/build/exec), kubectl (get/logs/describe/apply) |\n| Network | curl, wget |\n| Python | pytest, ruff, pip, uv pip |\n| Go | go test/build/vet, golangci-lint |\n| Packages | pnpm list/ls/outdated |\n\n### System prompt\n\nCopy `opencode.md` into your project or user config to teach the model about `rtk gain` and other meta commands.\n\n## Development\n\n```bash\nbun test          # run tests\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-6c00d9f1ee05ae0904e6fa72e81cdbe2"}