● gittrendingglobal

Home › Free AI tools

Free AI tools · 2026-03-15 · 7 min read · Updated 2026-10-16 · By the Git Trending Global team, facts checked against the source

RTK: Reduce Claude Code Token Usage for Free (2026 Guide)

Quick answer

RTK is a free tool to reduce Claude Code token usage. It trims noisy command output before your AI coding helper reads it. Works with Codex and Cursor too.

stars: 83.5K · license: Apache-2.0 + BUSL-1.1 · platforms: Mac, Windows, Linux

▶ Watch: RTK explained in under a minute

RTK is a free tool that helps you reduce Claude Code token usage by shrinking command output before your AI reads it. The makers say that output gets up to 90% smaller, and it works with Codex, Cursor and 15 other AI coding tools too.

Here's what it does in plain words, real ways to use it, the exact install steps, and a prompt that lets your AI helper set it up.

Key takeaways

What is RTK?

AI coding helpers like Claude Code do a lot of work by running commands on your computer. Each command prints text. The AI reads every word.

Much of that text is noise. A test run can list hundreds of passing tests just to tell you two failed. A file list can print one line per file.

AI companies charge by tokens, which are small chunks of text the AI reads or writes. And an AI can only hold so much text in mind at once. So noise costs you money and crowds out what matters.

RTK sits in the middle. The README says it "filters and compresses command outputs before they reach your LLM context." LLM just means the AI model. It's a single small program with "<10ms overhead," so you won't notice any slowdown.

The project has about 83.5K stars on GitHub. Stars work like bookmarks, so it's one of the most watched tools in this space.

Infographic showing how RTK helps reduce Claude Code token usage in 3 steps: your AI runs a command, RTK trims the output, the AI reads only what matters

How does RTK cut token use?

RTK uses four simple tricks, depending on the command:

  1. Smart filtering. It removes comments, blank space and boilerplate.
  2. Grouping. It bundles similar things, like files by folder or errors by type.
  3. Trimming. It keeps the useful part and cuts repeats.
  4. De-duplicating. It folds repeated log lines into one line with a count.

A few real examples from the README:

When your AI runs... RTK gives it...
A file list A tree with file counts, not one line per file
A test run Only the failures, with passing tests as a count
git log Just the ID, author and title of each change
git push One confirmation line instead of progress spam
docker ps Only the essential fields

It covers 100+ commands across Git, JavaScript, Python, Go, Docker, Kubernetes, AWS and more.

⚠️ Heads up: RTK only works on commands your AI runs through the terminal (the Bash tool). Claude Code's built-in Read, Grep and Glob tools don't pass through it.

How to use RTK (real examples)

Is RTK free?

Yes, for using it. The README says "Production use is free, engine and daemon included."

The licensing has two parts. The main command tool is Apache-2.0, a common open source license. One piece inside, the compression engine, uses BUSL-1.1. That license lets you use it freely but stops others from selling RTK as their own product. If you want only the Apache-2.0 part, there's an "oss" edition too.

💡 Tip: RTK sends no usage data unless you turn it on. The README says telemetry is "off by default" and never includes your commands or files.

RTK at a glance

Price Free to use
Works offline Yes, it runs on your computer
Platforms Mac, Windows, Linux
License Apache-2.0 + BUSL-1.1 (an Apache-only edition exists)
Works with 18 AI coding tools, including Claude Code, Codex and Cursor
Latest version 1.0.1 (October 14, 2026)
Best for Anyone who uses an AI coding helper every day

RTK at a glance infographic: free to use, works with 18 AI coding tools, 100+ commands, under 10ms overhead, about 83.5K GitHub stars

How to install RTK

These steps come straight from the RTK README. Open Terminal on Mac or Linux, or PowerShell on Windows.

On Mac or Linux with Homebrew (a free app installer), copy and paste this:

brew install rtk

On Windows, copy and paste this:

winget install rtk-ai.rtk

Or use the install script on Mac or Linux:

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

Next, check you got the right one. Another project called "rtk" exists, so this matters. Copy and paste this:

rtk --version
rtk gain

rtk gain must show a savings dashboard, not "command not found."

Connect RTK to your AI tool

For Claude Code, copy and paste this:

rtk init -g

For Codex, use this instead:

rtk init -g --codex

For Cursor, use this:

rtk init -g --agent cursor

Then restart your AI tool. From now on, when it runs git status, RTK rewrites it to rtk git status behind the scenes. Your AI doesn't need to know RTK is there.

⚠️ Heads up: The README is clear that RTK shrinks command output, which is only one part of what you pay for. Your prompt, chat history and the AI's replies also count. So expect real savings, but not a 90% smaller bill.

Let Claude or Codex set it up for you

Claude Code and OpenAI Codex are AI coding helpers that can run setup steps on your computer. You paste a request, it does the steps, and you approve each one.

Copy and paste this:

Please install RTK (github.com/rtk-ai/rtk) to reduce my token usage.
1. Check if I'm on Mac, Windows or Linux, and if Homebrew or winget is available.
2. Install RTK using the official command from the README.
3. Run "rtk --version" and "rtk gain" to make sure it's the right RTK.
4. Run the right "rtk init" command for the AI tool I'm using now.
5. Explain each step in plain words before you run it, and tell me to restart you at the end.

Then try asking:

Run "rtk gain --graph" and explain my token savings in plain words.
Run "rtk discover" and tell me which commands could save me more tokens.
Show me how to run one command without RTK filtering, in case I need the full output.

Our take

If you use an AI coding helper every day, RTK is one of the easiest wins out there. You set it up once, and it keeps working in the background.

What we like:

What to watch for:

Want to cut costs even more? Read our Caveman guide to make your AI talk less. Headroom also shrinks your token bill, and CodeGraph helps your AI find the right code in one step.

FAQ

Does RTK really reduce Claude Code token usage?

Yes. RTK shrinks the command output Claude Code reads, which lowers the tokens it uses. Your total bill drops by less, since output is only part of what you pay for.

Is RTK free?

Yes. The README says production use is free, including the engine and the optional proxy. You only need permission to sell RTK as a product.

Does RTK work with Codex and Cursor?

Yes. RTK supports 18 AI coding tools, including Codex, Cursor, GitHub Copilot, Gemini CLI and Windsurf. Each has its own rtk init command.

Will RTK break Claude's prompt cache?

No. The README says RTK filters each output once, and the result is cached normally after that.

How do I see how much RTK saved me?

Run rtk gain in your terminal. Add --graph for a 30-day chart or --daily for a day-by-day list.

Get RTK: github.com/rtk-ai/rtk

Follow @gittrendingglobal on Instagram for one free, useful tool every day.

📲 Watch the 30-second video on Instagram

Keep reading

📲 Like this? Follow @gittrendingglobal on Instagram for one free AI tool and the AI news that matters, every day.