This free GitHub plugin saves AI token usage
RTK is a free GitHub plugin that compresses command outputs before they reach Claude’s context window. Users report saving 60 to 95 percent in token consumption. Learn how to install it in three minutes and start reducing your AI costs today.
If you use Claude Code, Codex, or any AI coding tool with Claude, you’re probably spending more on tokens than you need to. A free plugin called RTK can compress your command outputs before they hit Claude’s context window. This means shorter sessions, better reasoning, and significantly lower costs.
The savings are real. Users running RTK report token efficiency rates between 57 and 65 percent, meaning they save that percentage of tokens on every command. Some commands see savings as high as 97 percent.
This guide shows you exactly how to install RTK, why it works, and how to measure your savings.
What Is RTK and Why It Matters
RTK is an open-source GitHub plugin designed to compress command outputs. When you run commands inside Claude Code or other AI coding environments, those command outputs get sent back to Claude as context. Every token in that context costs you money.
RTK intercepts those outputs and compresses them intelligently. It removes unnecessary text, condenses verbose outputs, and keeps only the useful information. Claude still understands what happened, but uses far fewer tokens to do it.
The tool currently has 71,000 stars on GitHub, which means it’s a trusted solution that many developers rely on.
Watch The Step-By-Step Tutorial On YouTube
Real Token Savings
When you run RTK gain in your terminal, it shows you exactly how many tokens you’ve saved. Real users report:
- 61 percent token efficiency on average
- 120,000 tokens saved in a single session
- Consistent 57 to 65 percent savings across multiple runs
- Some individual commands saving 97 percent of tokens
If you’re on Claude’s pro plan at $20 per month or using Codeex, these savings add up quickly. You can run more coding tasks, longer sessions, and experiment more without burning through your monthly credits.
How to Install RTK in Three Steps
RTK installs in minutes. You have two options: command line or Homebrew.
Option 1: Command Line Installation
Open your terminal and run this one-line command:
curl -fsSL https://get.rtk.sh | bash
This downloads and installs RTK automatically. You’re done.
Option 2: Homebrew Installation
If you use Homebrew on Mac or Linux, run:
brew install rtk
On Windows, use PowerShell and run the same command. Homebrew works across all systems now.
After installation, verify it worked by running:
rtk gain
Your terminal will show your current token efficiency rate.
How to Connect RTK to Claude Code
Simply adding RTK to your config file activates it. Here’s how:
For Claude Code, add RTK to your Claude Code config file. The process is straightforward. You may need to restart Claude Code for the changes to take effect.
RTK will then automatically prefix bash commands with its compression process. New sessions automatically use RTK without any additional steps from you.
For Codeex and Open Code, follow the same process. The RTK plugin installs itself into your config files. Restart your editor, and RTK is active.
You’ll see a notification confirming RTK is connected and ready to compress commands.
Measuring Your Token Savings
RTK gives you three ways to see how many tokens you’re saving.
Method 1: Terminal Commands
Run this in your terminal:
rtk gain
This shows your token efficiency percentage and total tokens saved. It updates every time you run the command.
Method 2: Ask Claude Directly
Inside Claude Code, ask Claude: “How many credits did I save with RTK?”
Claude pulls your RTK data and shows you:
- Total tokens saved
- Percentage reduction
- Number of commands processed
- Your biggest individual wins
For example, a real user asking this question got back: 61.6 percent reduction with 169,000 tokens saved across 447 commands.
Method 3: Headroom Dashboard (Optional)
Headroom is a companion tool that provides a visual interface. It runs on port 8787 and shows credit usage on a dashboard. However, it adds extra overhead and connection issues. Most users skip Headroom and just use the RTK terminal command instead.
Why RTK Works So Well
RTK succeeds because Claude’s context window accepts large amounts of information, but Claude still processes every token. Command outputs are often verbose and repetitive. They contain:
- File paths you don’t need
- Status messages that don’t affect the outcome
- Duplicate information
- Formatting and line breaks
RTK compresses these intelligently. It removes the noise while keeping the meaning. Claude understands the compressed output just as well as the original, but processes it in a fraction of the tokens.
For example, a command that normally outputs 1,000 tokens might compress to just 30 tokens. The information is still there. The reasoning still works. You just paid for 30 tokens instead of 1,000.
Real-World Token Savings Breakdown
One user running Claude’s Sonnet 5 model reported these savings:
- Session token efficiency: 61 percent
- Tokens saved in one session: 120,000
- Biggest single command win: 97.8 percent saved
- Commands processed: Dozens in a single session
Another user on Open Code with GLM 5.2 model saw:
- Token efficiency: 57.8 percent
- Tokens saved: 169,000
- Commands processed: 447 across the session
These aren’t theoretical savings. These are actual tokens that didn’t get billed.
At $3 per million input tokens on Claude’s pro plan, saving 120,000 tokens is worth $0.36 per session. If you code daily, that’s over $100 per year just from one session’s improvement. With RTK, you’ll see similar savings every single day.
RTK Compared to Alternatives
There is one alternative tool called Caveman, which is a custom skill you install in your coding environment. Caveman also compresses tokens and reduces costs.
However, RTK is the more popular choice. It has more GitHub stars, more users, and simpler installation. Most developers who try both prefer RTK.
RTK also integrates directly into Claude Code, Codeex, and Open Code without requiring additional setup. Caveman requires more manual configuration.
What Models Work With RTK
RTK works with any Claude model:
- Claude Sonnet 5
- Claude Opus 4.8
- Any Claude variant in Claude Code
- Open Code models like GLM 5.2
- Any model you access through Codeex
The compression principle works the same way regardless of which model you use. Heavier models like Opus see similar percentage savings to lighter models like Sonnet.
Common Questions About RTK
Do I need to change my workflow to use RTK?
No. RTK works automatically after installation. It prefixes bash commands with its compression process. You code exactly as before. RTK handles the compression silently.
Will RTK break my commands?
No. RTK compresses the output of commands, not the commands themselves. Your commands run exactly as normal. The outputs just get compressed before Claude sees them.
Does RTK work with Windows?
Yes. You can install RTK on Windows using PowerShell with either the curl command or Homebrew.
Can I see the compressed output?
Yes. RTK gain shows you the compression details. You can also ask Claude about your savings, and it will pull the specific data.
Do I lose information when RTK compresses?
No. RTK removes noise and redundancy. The meaningful information stays. Claude’s reasoning works exactly the same. You just save tokens on the verbose parts.
What happens if I disable RTK?
Your token usage goes back to normal, and you stop seeing savings. But your data and commands are unaffected. You can turn it on and off whenever you want.
Is RTK only for Claude Code?
No. It works in Claude Code, Codeex, Open Code, Cursor, and any command line interface that connects to Claude.
Do I need to pay for RTK?
No. RTK is completely free and open source on GitHub.
Will RTK save me money immediately?
Yes. You’ll see savings on your first session after installing it. The percentage varies based on your commands and how verbose your outputs are, but 57 to 65 percent is typical.
Can I combine RTK with other optimization tools?
Yes. You can use RTK and Headroom together, though Headroom adds complexity. Most users find RTK sufficient on its own.
Getting Started Right Now
Installation takes three minutes. Here’s the fastest path:
- Open your terminal or PowerShell.
- Run either:
curl -fsSL https://get.rtk.sh | bashorbrew install rtk - Open Claude Code, Codeex, or Open Code and add RTK to your config file.
- Restart your editor.
- Run your first command and watch your tokens compress.
That’s it. You’re now saving 60 to 95 percent on token usage.
Why This Matters for Your Business
If you’re using AI coding tools for client work, freelancing, or building products, token costs add up. Every long coding session burns through your monthly credits. Every debugging step costs tokens. Every command output that Claude processes costs you money.
RTK cuts these costs dramatically without changing how you work. You code the same way. Your results are the same. You just spend significantly less on tokens.
For businesses paying for pro plans at $20 per month or using Codeex on a team, RTK can reduce your total AI spending by 60 percent or more. On a team, that’s meaningful savings.
Final Thoughts
RTK is a free, trusted, and simple tool that delivers real token savings. Over 71,000 developers have found it valuable enough to star on GitHub. Real users report 60 to 95 percent token compression with no downsides.
If you’re using Claude Code, Codeex, or any Claude-powered coding environment, installing RTK is one of the highest-return actions you can take. The installation takes three minutes. The savings start immediately.
Frequently Asked Questions
Q: Does RTK work with all Claude models?
A: Yes. RTK compresses command outputs regardless of which Claude model you use.
Q: Will RTK slow down my coding?
A: No. RTK runs in the background and doesn’t affect your command execution speed.
Q: Can I see exactly what RTK is compressing?
A: Yes. Use the rtk gain command or ask Claude directly in your editor about your savings.
Q: Is RTK safe to use?
A: Yes. It’s open source with 71,000 GitHub stars and widely adopted by developers.
Q: What if my commands don’t have verbose outputs?
A: You’ll still save tokens, just maybe not 97 percent. Even brief outputs contain some redundancy that RTK can compress.
Q: Do I need technical knowledge to install RTK?
A: No. It’s one command in your terminal, and Homebrew installation is even simpler.
Next Steps
If you want help finding the best AI automation opportunities inside your business, book a free AI consultation call with Automojic.
We’ll look at your current workflows, identify where time and money are being wasted, and show you what can be automated first.
Any questions? Book your free consultation here.
Leave a comment