RTK (Rust Token Killer)
Tool : A precise action the AI can call
A small program that filters and compresses command output before the agent reads it, to reduce its token consumption.
A good share of a coding agent's context goes into verbose command output: test logs, file listings, traces. RTK sits between the agent and the terminal and lets only the useful part through, across about a hundred common commands. The project claims a 60 to 90% reduction, specifying that this figure applies to command output and not to the total bill. The integration rewrites the agent's commands through a hook. Only shell commands are affected, not the built-in read and search tools. Beware of the namesake: another project called rtk exists on crates.io.
Security reflects where data goes, requested permissions and incidents on record at the verification date. It is not a guarantee of zero risk: check the deployment mode and the connections you enable.
What it does, concretely
A coding agent re-reads its whole context at every turn, including the test logs, file listings and error traces it triggered. A good share of that context therefore goes into verbose command output, which you pay for each time. RTK (Rust Token Killer) targets that specific item.
In practice, RTK installs a hook in your agent. When the agent runs git status, for example, the command is rewritten as rtk git status and the agent reads a 3-line summary instead of 40 lines. The program covers more than a hundred common commands (Git, tests, linters, Docker, Kubernetes, and so on). Test failures, error messages and diffs are kept, and if a filter fails, the agent receives the raw output.
The project claims up to 90% reduction on command output, and 56% on average according to its website. It states that this figure does not apply to the total bill: command output tokens are only one part of the input, which is itself one part of the cost. The rtk gain command shows what you actually saved on your machine.
RTK is for people who already use a command-line coding agent (Claude Code, Codex, Cursor, Gemini CLI and others) and want a lighter context without changing their habits. It is less suited if you do not use a terminal, or if you expect the same drop on your whole bill. By default, only shell commands are filtered: the agent's built-in read and search tools are not.
What it offers
- ·Filters and compresses the output of more than a hundred common commands (Git, cargo, npm, pytest, go test, docker, kubectl, etc.) before the agent reads it.
- ·Automatically rewrites the agent's commands through a hook: git status becomes rtk git status, with no change to how you work.
- ·Keeps what matters: for tests, only failures are kept with their assertion, and passing tests are collapsed to a count.
- ·Never blocks: if a filter fails, the agent receives the raw output and the command's exit code is passed through unchanged.
- ·Measures your savings with rtk gain (summary, 30-day graph, history, JSON export) and finds missed opportunities with rtk discover.
- ·Lets you run a command unfiltered with rtk bypass, while still counting it in the statistics.
- ·Supports "pipelines", small rule files that are built in or shared by the community, for example to hand large file reads to a cheaper model of your choice.
- ·Offers an optional proxy, installed separately, that trims the traffic sent to the model provider without breaking the prompt cache.
In practice
- Price
- Free
- Available on
- cli, claude-code, codex, cursor, gemini-cli, any-agent
- FR interface
- No
Security and data
- Rating
- Security: one caveat, see the card
- Your data
- Data stays local
- Maintenance
- Active
- Last release
- 30 November 2026
Links and repository checked on 30 November 2026 · added on 30 November 2026
How to install RTK (Rust Token Killer)
brew install rtk