Skip to content

RTK (Rust Token Killer)

by RTK AI LabsCLI toolWrite code

Shrinks shell command output before your AI coding agent reads it, to save tokens

View on GitHub

The problem it solves

Your agent reads the full output of a test run or a git diff, and all that extra text fills its context and costs tokens.

For DevelopersClaude Code usersCursor and GitHub Copilot users

Before
Every command's full output goes into the agent's context, whether or not it helps.
After
The agent gets a compact version, such as failures only for tests, and rtk gain shows what was saved.
Stars
★ 86k
License
Apache-2.0 + BUSL-1.1
Cost
Free
Platforms
Mac · Win · Linux
Level
Intermediate

Overview

RTK is a single Rust program that sits between your AI coding agent and the shell. When the agent runs commands such as git status, ls, grep or a test runner, RTK filters and groups the output so the agent reads less text. A hook added with rtk init rewrites those commands for you, and rtk gain shows how much was saved. It supports 100+ commands and 18 AI coding tools, and it is built for developers who use them.

A one-time hook cuts the command output your agent reads, and a built-in report shows what it saved.

Try these first

Start with the first one: it is a small task you can check easily.

  1. Run rtk gain and explain what the savings dashboard shows. Don't change any files.First try · read-only

  2. Run the test suite and tell me which tests fail.runs commands

  3. Show git status and the last 5 commits in compact form.

  4. Use rtk bypass to show the full, unfiltered output of git log -20.runs commands

Example prompts written by Agent Flows Hub.

Features

From the creator's documentation.

FeatureWhat it doesRuns
Output filtersCompact output for git, ls, grep, test runners and 100+ other commandsYour computer
Agent hookrtk init adds a hook so the agent's shell commands are rewritten automaticallyYour computer
Savings reportrtk gain shows how much command output was cutYour computer
Bypass modertk bypass runs one command without filteringYour computer
Many agentsInit options for Claude Code, Gemini CLI, Codex, Cursor, Cline and moreYour computer
Optional telemetryA daily anonymous usage ping, off unless you consent during initNetwork

Good to know

Your coding agent runs git, test and search commands all day, and their long output fills its context. Install RTK, run rtk init for your agent, and the agent receives compact versions of that output instead.

Limits

  • The hook only fires on shell (Bash) tool calls; built-in read and search tools of an agent do not pass through it.
  • The percentages measure shell output only, not your bill, and the token counts are estimates (bytes divided by 4).

Notes by (original project name: RTK - Rust Token Killer), written from the creator's documentation, not from running it ourselves. RTK README: install, quick start and how savings work · rtk-engine licence (BUSL-1.1)

Stuck setting it up?

Tell us what happened. We take a look first; if it needs paid work, you get an estimate before anything starts.

Get help

Other cli tools

  • ShellGPT Turns a plain-English request into the terminal command you need, and can run it for you
  • Skill Seekers Turns a documentation site, PDF or GitHub repo into a skill your AI agent can use
  • Skills CLI Installs, updates and removes agent skills for Claude Code, Codex, Cursor and more
  • Spec Kit Adds spec-driven build, bug-fix and idea-check processes to your AI coding agent
  • Agent Reach Lets your AI agent search and read YouTube, Reddit, X, Bilibili, Xiaohongshu and more
  • agent-desktop Lets your AI agent read and click through the desktop apps on your computer

See all 29 cli tools

GitHub