rtk
CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies
RTK is a command-line proxy tool designed to reduce AI agent token consumption by 60-90% when executing common development commands. Written as a single Rust binary with zero dependencies, it intercepts shell command outputs and applies intelligent filtering, grouping, truncation, and deduplication before sending results to large language models. RTK supports over 100 commands across Git, testing frameworks, linters, package managers, AWS CLI, Docker, and more, making AI coding assistants significantly more efficient without sacrificing functionality.
Key Features
Use Cases
- 01Reducing token costs when AI agents run repetitive Git status, log, and diff commands during code reviews
- 02Compressing test runner output to show only failures while collapsing passing tests into summary counts
- 03Filtering verbose build tool output from Cargo, npm, Docker, and AWS CLI to essential information only
- 04Enabling AI coding assistants to work within smaller context windows by shrinking command outputs
- 05Tracking and analyzing token savings across development sessions to quantify efficiency improvements
- 06Improving AI agent response times by reducing the volume of text processed per command execution
Related Plugins
View moreollama
Get up and running with Kimi-K2.6, GLM-5.2, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
claude-code
Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.
funNLP
funNLP is a comprehensive Chinese natural language Plugin for Claude code
awesome-vue
🎉 A curated list of awesome things related to Vue.js
rtk — FAQ
What is RTK and how does it reduce AI token usage?+
RTK is a CLI proxy that intercepts shell command outputs and applies intelligent compression before your AI agent reads them, cutting bash output by 60-90% through filtering, grouping, truncation, and deduplication. This reduction in command output translates to fewer input tokens sent to the LLM, though the overall bill reduction depends on other factors like prompts and conversation history.
How do I install RTK?+
Install RTK via Homebrew (brew install rtk), the quick install script (curl -fsSL install.sh | sh), Cargo (cargo install --git), or download pre-built binaries for macOS, Linux, or Windows from GitHub releases. After installation, run 'rtk init -g' to set up the auto-rewrite hook for your AI coding tool, then restart the tool.
Which AI coding assistants work with RTK?+
RTK supports 16 AI tools including Claude Code, GitHub Copilot (VS Code and CLI), Cursor, Gemini CLI, Codex, Windsurf, Cline/Roo Code, OpenCode, OpenClaw, Pi, Hermes, Mistral Vibe, Kilo Code, Google Antigravity, Kimi AI, and Factory Droid. Each uses either hook-based command rewriting or plugin APIs to integrate RTK filtering.
Does RTK require API keys or external dependencies?+
No, RTK is a standalone Rust binary with zero dependencies and requires no API keys or network access for core functionality. Some advanced filters optionally shell out to ripgrep (rg) if available, but RTK works fully without it.
Is RTK free to use?+
Yes, RTK is open source under the Apache 2.0 license and completely free to use. Telemetry is disabled by default and requires explicit opt-in consent if you choose to help improve the project by sharing anonymous usage metrics.
Does RTK work on Windows?+
Yes, RTK has native Windows support as of version 0.37.2 with a binary hook system that works on Command Prompt, PowerShell, and Windows Terminal without requiring bash or Unix tools. It also works fully in WSL environments using the standard Linux installation method.
How do I install rtk?+
Open the source repository on GitHub and follow its README. rtk is a plugin — MCP Agents Market links you directly to the official repo.
Is rtk free?+
rtk is an open-source project hosted on GitHub. Check the repository for its license and any usage requirements.