StackMap
Subscribe
Explore / rtk
rtk-ai

rtk

Rust CLI proxy compressing dev-command output 60-90% before your agent reads it — git, tests, linters, docker, 100+ commands; hooks auto-rewrite bash calls. Single binary, <10ms overhead.

73,673 4,611 Rust Apache-2.0updated today
Curator's take

The rare token-saver whose README explains why its headline number is NOT your bill cut — bash output is one slice of input tokens, and the savings dilute; that honesty earns trust. Two things to know before judging your gains: the hook only intercepts Bash tool calls (Claude Code's built-in Read/Grep/Glob bypass it entirely), and `rtk gain` estimates tokens at bytes/4, not with a tokenizer. Compression is lossy by design — when a debugging session goes weird, the clue may be in the output rtk collapsed; `rtk proxy` is the escape hatch, use it. Beware the crates.io name collision with Rust Type Kit.

Mapped by ShipWithAI editors · links verified
README.md

RTK - Rust Token Killer

High-performance CLI proxy that cuts up to 90% of the bash output your agent reads

CI Release License: Apache 2.0 Discord Homebrew

WebsiteInstallTroubleshootingArchitectureDiscord

EnglishFrancais中文日本語한국어EspanolPortuguês


rtk filters and compresses command outputs before they reach your LLM context. Single Rust binary, 100+ supported commands, <10ms overhead.

What RTK Does

RTK intercepts shell commands and compresses their output before your agent reads it.

Operation What RTK does to the output
ls / tree Tree format with file counts instead of one line per entry
cat / read Smart file reading: signatures and structure over full bodies
grep / rg Truncates long lines, groups matches by file
git status Compact stat format, grouped by state
git diff Reduced context, headers stripped
git log Hash, author and subject only
git add/commit/push Confirmation line instead of full progress output
cargo test / npm test Failures only, passing tests collapsed to a count
ruff check Grouped by rule and file
pytest Failures only, traceback trimmed
go test NDJSON parsed, failures only
docker ps Essential fields only

How Savings Work

RTK cuts up to 90% of the bash output your agent reads. That is what RTK measures, and it is not the same as cutting your bill by 90%.

Bash output is one contributor to input tokens, alongside your prompt, the system prompt and conversation history. Input tokens are in turn only part of the bill, which also counts output tokens. The reduction dilutes at every step.

The token counts RTK reports are estimated as bytes / 4 — RTK ships no tokenizer, so the percentages are reliable but the absolute token numbers are approximate.

Full explanation: How RTK Savings Work

Installation

Homebrew (recommended)

brew install rtk

Quick Install (Linux/macOS)

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

Installs to ~/.local/bin. Add to PATH if needed:

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

Cargo

cargo install --git https://github.com/rtk-ai/rtk

Pre-built Binaries

Download from releases:

  • macOS: rtk-x86_64-apple-darwin.tar.gz / rtk-aarch64-apple-darwin.tar.gz
  • Linux: rtk-x86_64-unknown-linux-musl.tar.gz / `rtk-aar

Continue your stack

What teams reach for next — and why each earns a place beside rtk. Ranked by curator confidence.