One Rust binary, one install command, one verify command. Cuts shell-command tokens by ~80% before they hit your context window. CLAUDE CODE actually thinks better because it's not chewing through thousands of lines of boilerplate to find the three that matter.

Repo: github.com/rtk-ai/rtk · MIT license · Free, no paid tier · 47,000+ ⭐

This is the full breakdown promised in the post. Skip the section you don't need.


What you're about to install

rtk is a CLI proxy that sits between CLAUDE CODE and your shell. When CLAUDE CODE runs git diff, the hook quietly rewrites it to rtk git diff — same information back, ~75% fewer tokens. Same for cat, grep, pytest, cargo test, ls, docker ps, and ~100 other commands.

Four things going on under the hood (per the README):

  1. Smart filtering — strips comments, whitespace, boilerplate
  2. Grouping — aggregates similar items (files by dir, errors by type)
  3. Truncation — keeps the relevant context, cuts redundancy
  4. Deduplication — collapses repeated log lines with counts

Footprint: single Rust binary, zero dependencies, <10ms overhead per command. You will not notice it running.


Install — about 30 seconds

The one command (recommended)

brew install rtk

If you're not on Mac or don't have Homebrew:

curl -fsSL <https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh> | sh

Installs to ~/.local/bin. If rtk --version fails after the curl install, add it to your PATH:

echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc   # or ~/.bashrc
source ~/.zshrc`
``
> 

**Other paths if you prefer:** `cargo install --git <https://github.com/rtk-ai/rtk`>, or grab a pre-built binary from the [releases page](<https://github.com/rtk-ai/rtk/releases>).