Filters and compresses command outputs to significantly reduce LLM token consumption for developers using AI coding assistants.
rtk is an open-source, high-performance CLI proxy built by rtk-ai that optimizes command outputs before they reach large language model (LLM) contexts. It addresses the problem of high token consumption and context window limitations in AI coding sessions by filtering and compressing verbose command-line results.
ls, git status, and cargo test.rtk equivalents for various AI coding tools.The tool acts as a proxy, intercepting bash commands before execution and processing their output to optimize for LLM consumption. It takes raw command output as input and produces a significantly compressed version. rtk is delivered as a single Rust binary CLI tool, installable via Homebrew or direct script, and operates as an open-source project under the MIT License.
Developers leveraging AI coding assistants like Claude Code or GitHub Copilot who want to reduce LLM token costs and improve the relevance of command output in their AI's context.
The automatic command rewriting hook system is not fully supported on native Windows environments, requiring explicit rtk command calls. Built-in tools within some AI assistants (e.g., Claude Code's Read or Grep) may bypass the Bash hook and need explicit rtk command usage.