RTK - Rust Token Killer
RTK is a high-performance CLI tool written in Rust that dramatically reduces LLM token consumption by filtering and compressing command outputs before they reach your AI coding assistant’s context.Token Savings: RTK achieves 60-90% reduction in tokens on common development operations.A typical 30-minute Claude Code session goes from ~150,000 tokens down to ~45,000 tokens - a 70% reduction.
Why RTK Matters
AI coding assistants like Claude Code, Cursor, and Copilot consume massive amounts of tokens when reading command outputs. Everygit status, npm test, or ls -la sends verbose output into the LLM context - wasting tokens, hitting rate limits, and slowing down your workflow.
RTK sits between your AI assistant and the shell, intelligently filtering outputs to preserve only what matters:
Key Benefits
Massive Token Savings
Save 60-90% of tokens on common operations like
git log, cargo test, npm install.Zero Workflow Changes
Install once with hooks, and all commands are automatically optimized - no manual prefixing needed.
Lightning Fast
Written in Rust with <10ms startup time. No performance overhead in your development workflow.
Analytics Built-In
Track your savings with
rtk gain - see exactly how many tokens you’ve saved over time.Token Savings Examples (30-min Session)
Here’s what RTK saves you in a typical Claude Code coding session:| Operation | Frequency | Standard | RTK | Savings |
|---|---|---|---|---|
ls / tree | 10× | 2,000 | 400 | -80% |
cat / read | 20× | 40,000 | 12,000 | -70% |
grep / rg | 8× | 16,000 | 3,200 | -80% |
git status | 10× | 3,000 | 600 | -80% |
git diff | 5× | 10,000 | 2,500 | -75% |
git log | 5× | 2,500 | 500 | -80% |
npm test | 5× | 25,000 | 2,500 | -90% |
docker ps | 3× | 900 | 180 | -80% |
| Total | ~99,400 | ~22,880 | -77% |
How It Works
RTK applies four intelligent strategies based on command type:Smart Filtering
Removes noise like comments, whitespace, boilerplate progress bars, and redundant metadata.
Real-World Example
Standard git push output (15 lines, ~200 tokens):Use Cases
AI Coding Sessions
Maximize your Claude Code, Cursor, or Copilot rate limits by sending 70% fewer tokens.
Monorepo Development
Work in large codebases without overwhelming your LLM with verbose
ls, tree, or find outputs.Test-Driven Development
See only test failures, not the 200+ lines of passing test noise. Works with
cargo test, npm test, pytest, go test.Git-Heavy Workflows
Condense
git log, git diff, git status into compact summaries that preserve all critical info.Supported Commands
RTK optimizes 50+ commands across multiple ecosystems:Git Operations
git status, git diff, git log, git add, git commit, git push, git pull, git branch, git fetch, git stash
Test Runners
cargo test, npm test, pytest, go test, vitest, playwright test
Package Managers
npm install, pnpm list, pip install, cargo build
Linters & Type Checkers
eslint, ruff check, tsc, mypy, golangci-lint, cargo clippy
Containers
docker ps, docker logs, kubectl get pods, kubectl logs
And More
ls, tree, grep, cat, curl, wget, gh pr list, prisma migrate, next build
View full command reference →
Next Steps
Install RTK
Get RTK installed in under 5 minutes with Homebrew, cargo, or pre-built binaries.
Quick Start
Follow our 5-minute guide to install, verify, and start saving tokens immediately.
