Back to Rtk

RTK Documentation

docs/guide/index.md

0.38.02.5 KB
Original Source

RTK — Rust Token Killer

RTK is a CLI proxy that sits between your AI assistant and your development tools. It filters command output before it reaches the LLM, keeping only what matters and discarding boilerplate, progress bars, and noise.

Result: 60-90% fewer tokens consumed per command, without changing how you work. You run git status as usual — RTK's hook intercepts it, filters the output, and the LLM sees a compact 3-line summary instead of 40 lines.

How it works

Your AI assistant runs:  git status
                              ↓
              Hook intercepts (PreToolUse)
                              ↓
              rtk git status  (transparent rewrite)
                              ↓
     Raw output: 40 lines     →     Filtered: 3 lines
     ~800 tokens              →     ~60 tokens  (92% saved)
                              ↓
              LLM sees the compact output

Zero config changes to your workflow. The hook handles everything automatically.

What RTK optimizes

Dozens of commands across all major ecosystems — Git, Cargo/Rust, JavaScript, Python, Go, Ruby, .NET, Docker/Kubernetes, and more. See What RTK Optimizes for the full list with savings percentages.

Get started

  1. Installation — Install RTK and verify you have the right package
  2. Quick Start — Connect to your AI assistant in 5 minutes
  3. Supported Agents — Claude Code, Cursor, Copilot, Gemini, and more

Measure your savings

bash
rtk gain           # total savings across all sessions
rtk gain --daily   # day-by-day breakdown
rtk gain --weekly  # weekly aggregation

See Token Savings Analytics for export formats and analysis workflows.

Analyze your usage

bash
rtk discover       # find commands that ran without RTK (missed savings)
rtk session        # RTK adoption rate per Claude Code session

See Discover and Session for details.

Further reading