RTK
RTK. (Rust Token Killer) is an open-source CLI proxy that compresses shell command output before it reaches an AI Agent context window, typically cutting token use by 60-90% with transparent hooks for Claude Code, Cursor, and other coding assistants.
Blurb
RTK reduces Claude Code token usage by 60-90% - measured across 2,900+ real commands. 89% avg noise removed, 3x longer sessions, zero config. Apache 2.0 licensed.
Summary
RTK sits between your agent and the shell. A PreToolUse-style hook rewrites commands like git status to rtk git status before execution; the model sees a compact summary instead of verbose boilerplate, progress bars, and repeated lines. Upstream reports ~89% average noise reduction across 2,900+ real commands (e.g. cargo test ~92%, git status ~81%, find ~78%).
Use when long agent sessions burn context on test runners, git diffs, linters, and container/k8s CLI output. rtk init -g wires Claude Code and Copilot; rtk init -g --agent cursor targets Cursor. rtk gain tracks per-command savings. Built-in agent tools (Read, Grep, Glob in Claude Code) bypass the hook unless you use shell equivalents or explicit rtk read / rtk grep calls.
Details
- Install:
curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh | sh, Homebrew (brew install rtk), orcargo install --git https://github.com/rtk-ai/rtk. - Setup:
rtk init -g(Claude Code / Copilot),rtk init -g --agent cursor(Cursor), plus flags for Gemini, Windsurf, Cline, OpenCode, and others per GitHub README. - Analytics:
rtk gain,rtk gain --graph,rtk discover(commands that ran without RTK),rtk session(adoption rate). - License: MIT; source at github.com/rtk-ai/rtk.
- Scope: 100+ commands across Git, Rust/Cargo, JS/TS, Python, Go, Docker, kubectl, and more.
- Fit: Tool / AI Agent adjunct, not a replacement for the agent runtime itself.
- Contrast: manual output truncation or narrower tool permissions; pairs with Claude Code and cursor-agent rather than competing with them.