Skip to main content

RTK - Rust Token Killer

High-performance CLI proxy that reduces LLM token consumption by 60-90% on common dev commands through intelligent output filtering. Save tokens, save money, work faster.

Token Savings in Action

RTK achieves 60-90% token reduction on common development operations:

Git Operations

80-92% savingsCompact git status, logs, diffs, and commits

Test Output

90% savingsShow only failures, hide verbose test output

Linting

80-85% savingsGrouped errors, summary stats only

Key Features

Zero Overhead

Less than 10ms startup time. Single Rust binary with no dependencies.

Smart Filtering

Four strategies: filtering, grouping, truncation, and deduplication.

Claude Code Integration

Auto-rewrite hooks for 100% transparent command interception.

Multi-Language Support

JavaScript, Python, Go, Rust - with specialized handlers for each ecosystem.

Token Analytics

Track savings over time with built-in SQLite analytics.

Cross-Platform

Works on macOS, Linux, and Windows with native binaries.

Quick Example

See the difference RTK makes:
Without RTK (200+ lines)
$ git status
On branch main
Your branch is up to date with 'origin/main'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   src/main.rs
        modified:   src/utils.rs
        modified:   Cargo.toml

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        new-feature.rs

no changes added to commit (use "git add" and/or "git commit -a")
With RTK (1 line)
$ rtk git status
3 modified, 1 untracked
Token savings: 80%

Get Started in Minutes

1

Install RTK

Choose your preferred installation method:
brew install rtk
2

Verify Installation

Check that RTK is installed correctly:
rtk --version
rtk gain
The rtk gain command should show token savings stats (not “command not found”).
3

Set Up Claude Code Integration

Initialize RTK for automatic command rewriting:
rtk init --global
This installs a hook that automatically rewrites commands like git status to rtk git status.
4

Start Saving Tokens

Use RTK with any supported command:
rtk git status
rtk test cargo test
rtk lint
rtk gh pr list

File Operations

rtk ls, rtk read, rtk grep, rtk find

Git Commands

rtk git status, rtk git log, rtk git diff

Testing

rtk test, rtk cargo test, rtk vitest, rtk pytest

Linting

rtk lint, rtk tsc, rtk ruff, rtk golangci-lint

Community

GitHub

Star the repo, report issues, contribute code

Documentation

Complete guides, API reference, and examples