{"_id":"@baggiiiie/pi-rtk-rewrite","_rev":"2-66e7c898cafa7477ad19f9fc754031cb","name":"@baggiiiie/pi-rtk-rewrite","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"@baggiiiie/pi-rtk-rewrite","version":"0.0.1","keywords":["pi-package"],"_id":"@baggiiiie/pi-rtk-rewrite@0.0.1","maintainers":[{"name":"baggiiiie","email":"yc@yingchao.dev"}],"pi":{"extensions":["./src/index.ts"]},"dist":{"shasum":"a4f48b4b9fbb8303448208113d3ae42fc85dad1a","tarball":"https://registry.npmjs.org/@baggiiiie/pi-rtk-rewrite/-/pi-rtk-rewrite-0.0.1.tgz","fileCount":4,"integrity":"sha512-PWK4R1odavEuzOdB3IT5AGe92jU3it3azOoE6Ubxf8R0pPMPZw20vT+DSZiM8w5JI1ocxULsYW51iMWOTV5DDQ==","signatures":[{"sig":"MEUCIQDchL9nmjhvCxP2hhg9MzO8luWNQ3i3BIxExpZBAanMiAIgMr8+xkgHSh+imLj9BgXe7PPwn5an6GiZJJJR6KlWAVk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10308},"type":"module","gitHead":"6950b34280de2f7ba32c7bf279a1679c9a127a2b","_npmUser":{"name":"baggiiiie","email":"yc@yingchao.dev"},"_npmVersion":"11.12.1","description":"A pi package that rewrites `bash` tool calls through [RTK](https://github.com/rtk-ai/rtk) before execution.","directories":{},"_nodeVersion":"25.5.0","_hasShrinkwrap":false,"peerDependencies":{"@mariozechner/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-rtk-rewrite_0.0.1_1776279924053_0.1808392502853069","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@baggiiiie/pi-rtk-rewrite","version":"0.0.2","type":"module","keywords":["pi-package"],"pi":{"extensions":["./src/index.ts"]},"peerDependencies":{"@mariozechner/pi-coding-agent":"*"},"gitHead":"b063c783dd57551ada7ef149c69b411555a02bee","_id":"@baggiiiie/pi-rtk-rewrite@0.0.2","description":"A pi package that rewrites `bash` tool calls through [RTK](https://github.com/rtk-ai/rtk) before execution.","_nodeVersion":"25.5.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-D7rlAbVlhIXs9vLhCBhVjpAE66L+7itAEZZ+Wim3cQG1CKsB6OeFy8kBb2jd7b3hwXpBVzDf7Kyw0uGH6NXg/Q==","shasum":"1717dce1803f4859b639d7acda34b412d5f1e50a","tarball":"https://registry.npmjs.org/@baggiiiie/pi-rtk-rewrite/-/pi-rtk-rewrite-0.0.2.tgz","fileCount":4,"unpackedSize":10536,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDjpSLOaaLLbOLDQfMi29ha5J7wi1kKbvGhwRy8CX7pKwIhANade+WDbNzWeXfUVEuIdE0ydD4y+uNSxkrvcNGHGAwq"}]},"_npmUser":{"name":"baggiiiie","email":"yc@yingchao.dev"},"directories":{},"maintainers":[{"name":"baggiiiie","email":"yc@yingchao.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-rtk-rewrite_0.0.2_1777869409721_0.3075878477924745"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-15T19:05:23.924Z","modified":"2026-05-04T04:36:49.974Z","0.0.1":"2026-04-15T19:05:24.243Z","0.0.2":"2026-05-04T04:36:49.864Z"},"keywords":["pi-package"],"description":"A pi package that rewrites `bash` tool calls through [RTK](https://github.com/rtk-ai/rtk) before execution.","maintainers":[{"name":"baggiiiie","email":"yc@yingchao.dev"}],"readme":"# @baggiiiie/pi-rtk-rewrite\n\nA pi package that rewrites `bash` tool calls through [RTK](https://github.com/rtk-ai/rtk) before execution.\n\nIf RTK can optimize a command, pi transparently changes commands like:\n\n```text\ngit status\n```\n\ninto:\n\n```text\nrtk git status\n```\n\nThat usually cuts token-heavy shell output by a lot, especially for `git`, `rg`, `find`, tests, builds, and similar commands.\n\n## Install\n\n```bash\npi install /path/to/pi-stuff/packages/rtk-rewrite\n```\n\nOr after publishing:\n\n```bash\npi install npm:@baggiiiie/pi-rtk-rewrite\n```\n\n## Requirements\n\nInstall RTK separately and make sure `rtk rewrite` works in your shell:\n\n```bash\nbrew install rtk\n# or\ncurl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh | sh\n\nrtk rewrite \"git status\"\n```\n\n## Usage\n\nOnce installed, restart pi or run `/reload`.\n\n```text\n/rtk-rewrite\n/rtk-rewrite status\n/rtk-rewrite on\n/rtk-rewrite off\n/rtk-rewrite refresh\n/rtk-rewrite test git status\n```\n\n## Environment knobs\n\n```bash\nPI_RTK_REWRITE_ENABLED=1\nPI_RTK_REWRITE_TIMEOUT_MS=2000\nPI_RTK_REWRITE_VERBOSE=0\nPI_RTK_REWRITE_SHOW_STATUS=1\n```\n\n## Notes\n\n- This only rewrites pi `bash` tool calls.\n- pi built-in tools like `read`, `edit`, and `write` do not go through RTK.\n- The extension never blocks the original bash command if RTK fails or has no rewrite.\n","readmeFilename":"README.md"}