# RTK - Rust Token Killer

> High-performance CLI proxy written in Rust that reduces LLM token consumption by 60-90% by filtering and compressing command outputs before they reach your AI coding assistant.

RTK (Rust Token Killer) is an open-source CLI proxy that intercepts shell command outputs and compresses them before they reach your LLM context window, delivering 60-90% token savings on common developer commands. Built as a single Rust binary with zero dependencies and less than 10ms overhead, it supports 100+ commands across git, test runners, build tools, package managers, AWS, and containers. RTK integrates with 12 AI coding tools including Claude Code, GitHub Copilot, Cursor, Gemini CLI, Windsurf, and Cline via transparent auto-rewrite hooks that require no changes to your workflow.

- **Smart Filtering** — *removes noise such as comments, whitespace, and boilerplate from command output before it reaches the LLM context.*
- **Grouping** — *aggregates similar items (files by directory, errors by type) to reduce repetitive output.*
- **Truncation** — *keeps relevant context and cuts redundancy, preserving only what the LLM needs.*
- **Deduplication** — *collapses repeated log lines with counts to minimize token waste.*
- **Auto-Rewrite Hook** — *transparently rewrites Bash commands (e.g., `git status` → `rtk git status`) so AI tools get compressed output with zero manual effort; install with `rtk init -g`.*
- **100+ Supported Commands** — *covers git, GitHub CLI, Jest, pytest, cargo test, ESLint, TypeScript, Docker, kubectl, AWS CLI, and many more.*
- **Token Savings Analytics** — *use `rtk gain` to view summary stats, ASCII graphs, daily breakdowns, and JSON exports of tokens and estimated USD saved.*
- **Missed Savings Discovery** — *`rtk discover` scans recent sessions to identify commands that bypassed RTK and could have saved more tokens.*
- **Multi-Agent Support** — *integrates with Claude Code, Cursor, Gemini CLI, Codex, Windsurf, Cline/Roo Code, OpenCode, Kilo Code, and more via per-agent init commands.*
- **Configurable via TOML** — *customize excluded commands, tee mode for failure recovery, and per-project filters in `~/.config/rtk/config.toml`.*
- **Privacy-First Telemetry** — *opt-in only, GDPR-compliant anonymous aggregate metrics; no source code, file paths, or secrets are ever collected.*
- **Cross-Platform** — *available via Homebrew, curl installer, Cargo, or pre-built binaries for macOS, Linux, and Windows (with full hook support on WSL).*

## Features
- 60-90% LLM token reduction on common dev commands
- Auto-rewrite hook for transparent command interception
- 100+ supported commands across git, test runners, build tools, AWS, Docker, kubectl
- Smart filtering, grouping, truncation, and deduplication strategies
- Token savings analytics with rtk gain (graphs, history, JSON export)
- Missed savings discovery with rtk discover
- Integration with 12 AI coding tools (Claude Code, Cursor, Copilot, Gemini CLI, Windsurf, Cline, etc.)
- Single Rust binary, zero dependencies, <10ms overhead
- Configurable via TOML (excluded commands, tee mode, per-project filters)
- Failure recovery via tee: saves full unfiltered output on command failure
- GDPR-compliant opt-in telemetry
- Cross-platform: macOS, Linux, Windows (WSL recommended)

## Integrations
Claude Code, GitHub Copilot, Cursor, Gemini CLI, Codex (OpenAI), Windsurf, Cline, Roo Code, OpenCode, OpenClaw, Kilo Code, Google Antigravity, Git, GitHub CLI, Jest, Vitest, Playwright, pytest, cargo test, go test, RSpec, ESLint, Biome, TypeScript, Next.js, Prettier, cargo clippy, ruff, golangci-lint, RuboCop, pnpm, pip, uv, Prisma, AWS CLI, Docker, kubectl, Homebrew

## Platforms
WINDOWS, MACOS, LINUX, WEB, API, VSC_EXTENSION, CLI

## Pricing
Open Source

## Version
v0.38.0

## Links
- Website: https://www.rtk-ai.app
- Documentation: https://www.rtk-ai.app/guide
- Repository: https://github.com/rtk-ai/rtk
- EveryDev.ai: https://www.everydev.ai/tools/rtk-rust-token-killer
