Skip to content

rtk (Rust Token Killer)

Rust CLI proxy whose hook rewrites agent shell commands to compress their output; a JetBrains benchmark found no bill savings.

Reviewed by Sheela · Updated

View on GitHub Open source

Our rating

3.4/5

It makes shell output shorter, which is not the same as making Claude Code cheaper, and both independent cost tests found it was not.

What it is

rtk is a single Rust binary that sits between a coding agent and the shell. rtk init -g adds a Claude Code PreToolUse hook that rewrites commands such as git status to rtk git status, and rtk filters, groups and truncates the output before the model sees it. It covers 100+ commands, including git, test runners, linters, Docker, Kubernetes and cloud CLIs, and supports 18 agents including Codex and Google Antigravity.

The CLI is Apache-2.0 and links a BUSL-1.1 compression engine; an Apache-only rtk-oss build drops the engine, and a separate BUSL-1.1 rtk-proxy daemon compresses API traffic. Production use is free; reselling rtk as a product or service needs a licence. Telemetry is off by default. The maintainers also sell RTK Pro, a team control layer with secret redaction, policies and sandboxes, as a hosted tenant or self-hosted.

Our review

rtk compresses what it can see, and it sees little. JetBrains' paired benchmark of 86 SkillsBench tasks in July 2026 found the hook touched about a third of Bash calls, carrying just under 20% of tool-result characters, because Read and Grep bypass it and pipes, heredocs and python3 calls are left alone. Their ceiling estimate put the maximum possible saving at about 3% of input tokens.

The measured result was worse than that ceiling. At low reasoning effort, sessions with rtk cost a median 7.6% more and took 13.8% more turns; at high effort the difference was zero, and task quality was tied in both. rtk's own counter reported 96 million tokens saved over the same runs. The README is candid that its figures are bytes divided by four and that less Bash output "is not the same as cutting your bill".

A second, smaller test from Glia Intelligence came to the same answer. On six Aider Polyglot tasks with Claude Opus 5 at low effort, rtk cut shell output by 76% by its own estimate, yet Claude Code's reported total was $2.66 with rtk against $2.52 without. New input fell a median 0.5%, missing the 10% target the authors set in advance, and 17 of 18 rtk runs passed against 18 of 18 without. Directory listings produced most of the saving; 15 cat commands saved nothing.

The security record deserves a look because the hook rewrites every Bash command the agent runs. Three advisories have been published since May 2026: project-local filter files that could silently alter output shown to the model (fixed in 0.32.0), a high-severity bypass of the permission gate via unsplit shell separators, and command injection in the OpenClaw rewrite plugin. Current releases fix the first two; an unrelated crate also called rtk means checking rtk --version after install.

The project moves fast, with 84,000 stars, v1.0.1 on 14 October 2026 and release candidates several times a day since, and nearly 900 open issues. Its value is real where a session is dominated by verbose test runners or build logs, but the evidence says to measure the bill with ccusage, not the savings counter.

Where it earns its place

  • A solo developer running Claude Code on a large TypeScript monorepo

    Stop jest and tsc output flooding the context window

    brew install rtk, then rtk init -g; failures-only test output keeps long sessions readable. Measure with ccusage for a week with and without it, since JetBrains found no saving on average.

  • A platform engineer standardising agent tooling for 30 developers

    Decide whether to roll rtk out by default

    The free CLI costs nothing per seat, but it adds a hook that rewrites every shell command. Pin a release at or above the advisory fixes, prefer rtk-oss if BUSL terms worry legal, and pilot before mandating.

  • An engineering manager watching a monthly Claude bill

    Cut agent spend without hurting output quality

    rtk alone is unlikely to move the invoice: the cap JetBrains computed was about 3% of input tokens. Effort settings and model choice have far more effect on cost.

Before you commit

Setup
brew install rtk, winget install rtk-ai.rtk, or the curl install script; then rtk init -g (or the per-agent flag) installs the hook. Under a minute to a first rewritten command.
Integrations
18 agents including Claude Code, Codex, OpenClaw, Google Antigravity and Kimi, via PreToolUse hooks, plugins or AGENTS.md instructions; 100+ commands across git, gh, npm, pytest, Go, Docker, Kubernetes, AWS and Terraform.
Data and privacy
Runs locally and sends nothing by default; anonymous telemetry is opt-in with rtk telemetry enable and never includes command or file contents. Three GitHub advisories, one high-severity. BUSL-1.1 on the engine and proxy bars offering rtk to third parties as a commercial service without a licence.
Cost at scale
The CLI is free for production use. RTK Pro, the paid team edition with secret redaction, policies, observability and sandboxes, runs as a hosted tenant, in your cloud or on-premise; prices were not readable on its pricing page.
Limits
Only Bash tool calls pass through the hook; Read, Grep and Glob do not. About 900 open issues, many on Windows hook detection and silent truncation; release candidates ship several times a day.

What's good

  • Cuts noise from test, build and git output
  • Single binary covering 18 agents
  • Telemetry off by default
  • Apache-only edition for licence-sensitive teams

What's not

  • Two independent cost tests found no saving (7.6% and 5.8% more in their headline runs)
  • Built-in savings counter estimates bytes, not billed tokens
  • Three security advisories since May 2026
  • Hook rewrites every Bash command the agent runs

Best for

Developers with very noisy shell output who will measure the effect themselves.

Alternatives

rtk (Rust Token Killer): common questions

Is rtk (Rust Token Killer) worth it?
It makes shell output shorter, which is not the same as making Claude Code cheaper, and both independent cost tests found it was not. We rate it 3.4 out of 5.
How much does rtk (Rust Token Killer) cost?
Free (Apache-2.0 CLI plus BUSL-1.1 engine; Apache-only rtk-oss available). Commercial resale needs a licence. RTK Pro team edition is paid, with a 7-day trial.
What are the downsides of rtk (Rust Token Killer)?
Two independent cost tests found no saving (7.6% and 5.8% more in their headline runs); built-in savings counter estimates bytes, not billed tokens; three security advisories since May 2026; hook rewrites every Bash command the agent runs.
Who is rtk (Rust Token Killer) best for?
Developers with very noisy shell output who will measure the effect themselves.
How much does rtk (Rust Token Killer) cost for a team or in production?
The CLI is free for production use. RTK Pro, the paid team edition with secret redaction, policies, observability and sandboxes, runs as a hosted tenant, in your cloud or on-premise; prices were not readable on its pricing page.
Is rtk (Rust Token Killer) safe for company data?
Runs locally and sends nothing by default; anonymous telemetry is opt-in with rtk telemetry enable and never includes command or file contents. Three GitHub advisories, one high-severity. BUSL-1.1 on the engine and proxy bars offering rtk to third parties as a commercial service without a licence.
What are the best rtk (Rust Token Killer) alternatives?
The closest alternatives we have reviewed are ccusage, Graphify, Claude Code Router and context-mode.

Answers checked Oct 24, 2026.