Save 80% of your LLM coding tokens by filtering noisy CLI output

TL;DR: RTK (Rust Token Killer) is a small CLI proxy that filters and compresses noisy command output (logs, stack traces, git status, test output) before it hits your LLM prompt. In a 30-minute Claude Code session I went from ~118k tokens to ~24k  about an 80% reduction and 4–5x cost savings. Easy install, single binary, no deps. Works with Claude Code, Cursor, Codex, Gemini CLI.

Why this matters

> LLM based coding tools often bill by tokens. Verbose terminal output (build logs, test dumps, git status) can dominate the context without adding value.

> Reducing that noise saves money and keeps the model focused on the useful parts of your session.

What RTK (Rust Token Killer) does

> Acts as a CLI proxy that intercepts and filters command output before it’s sent to the LLM.

> Compresses or summarizes long outputs (e.g., test failures, stack traces) while retaining actionable info.

> Needs no change to your workflow just install the binary and run your usual commands through it.

> Zero dependencies (single Rust binary) and simple install.

My real-world numbers (30-minute Claude Code session)

> Total tokens before RTK: ~118,000

> Total tokens after RTK: ~23,900

> Reduction: ~80% (4–5x cost reduction)

> Examples:

  • git status: ~2,000 → ~200
  • cargo test: ~25,000 → ~2,500

Compatibility

> Works with Claude Code, Cursor, Codex, Gemini CLI, and similar LLM coding tools.

> Repo is popular (~65k stars), not an obscure toy project.

Why I trusted it quickly

> Single statically linked Rust binary means easy installs and predictable behaviour.

> Keeps the important parts of output (error messages, failing tests) but trims repetition and verbosity that provide little value to the model.

> Plug-and-play: no configuration changes to how I invoke tools or how my editor/LLM integration works.

How to try it

> Install the RTK binary (one command install).

> Pipe or run your usual commands through RTK.

> Compare token usage or LLM bill during a normal coding session.

Other tips I use to reduce token costs

> Trim prompt history: keep only the last few messages and important context snippets.

> Summarize long files before sending: use a short human-written or automated summary of the file’s intent + changed hunks.

> Send diffs not whole files: only send changed hunks when possible.

> Chunk outputs: split very long logs into numbered chunks and only send the chunk that shows the failure.

> Use cheaper models for heavy context scanning, and switch to a stronger model only for the final reasoning step.

> Cache model answers for repeated queries (e.g., test-expectations or static linting suggestions).

> Client-side compression/summarization tools: custom scripts or other community tools that prune logs.

Questions for you

> How big are your typical sessions (minutes/hours)? Curious if the savings scale linearly.

> Has anyone else tried RTK? What are your trade-offs? Did you miss any info after filtering?

If you want, I can:

> Draft a short README-style blurb or tweet-sized post for sharing the link.

> Suggest a precise command example to show how to pipe git/cargo through RTK.

source - { https://porsai.com }{ https://www.linkedin.com/company/porsai/ }

Posted Jul 10, 2026, 2:19 PM UTC

13
Loading comments…