rtk-ai/rtk
CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies
What it solves
RTK (Rust Token Killer) reduces the volume of bash output that AI agents read, cutting up to 90% of the noise. This prevents LLM context windows from being filled with redundant boilerplate, long logs, and verbose command outputs, which lowers costs and improves agent efficiency.
How it works
RTK acts as a high-performance CLI proxy written in Rust. It intercepts shell commands and applies four primary compression strategies:
- Smart Filtering: Removes noise like comments and whitespace.
- Grouping: Aggregates similar items, such as grouping errors by type or files by directory.
- Truncation: Keeps essential context while cutting redundant data.
- Deduplication: Collapses repeated log lines into counts.
It can be used as a standalone CLI tool or via an auto-rewrite hook that transparently converts standard commands (e.g., git status) into rtk equivalents (e.g., rtk git status) before the agent executes them.
Who it’s for
Developers using AI coding agents (such as Claude Code, Cursor, Windsurf, or GitHub Copilot) who want to reduce token usage and avoid context clutter when agents execute shell commands.
Highlights
- Broad Command Support: Supports over 100 commands across files, Git, GitHub CLI, test runners (Jest, Pytest, Cargo), build tools, and cloud providers (AWS, Docker, Kubernetes).
- Low Overhead: Single Rust binary with less than 10ms of overhead.
- Transparent Integration: Native hooks for 17 different AI tools to automate command rewriting.
- Token Analytics: Built-in dashboard (
rtk gain) to track estimated token savings over time.
Related
- Dispatch
- Project
- Project
- Project