6 Open-Source Tools to Reduce Your Token Usage
- Discuss this with your agent
- Open in Claude
- Open in ChatGPT
Token-usage has been a hot topic in recent months, with some big providers switching to usage-based billing, news of developers burning through eye-watering amounts of money generating code with AI (one company blew $500m on Claude in a month), and the unavoidable fact that more tokens means more energy consumption, which means more harm caused to the environment. So when we stumbled across Daniela Baronâs article, we took a closer look at a few tools you can use right away to save some tokens.
rtk
Rust Token Killer is the standout pick from Danielaâs article. It sits between your agent and the shell, intercepting commands like git log, and returning a condensed, deduplicated version, meaning the input is reduced massively. According to their own benchmarks, a 30-minute session using 110,000+ tokens is reduced to around 23,000, a saving of around 80%.
The rtk gain --daily command shows exactly how much youâve saved, and it supports 15 AI coding tools out of the box.
Caveman
Where rtk trims your input, Caveman trims the output. Itâs a skill for Claude Code, Codex, Copilot, and 30+ other agents that filters out filler, answering a little like a caveman (it all makes sense now, doesnât it?).
It cuts output tokens by roughly 65% on its benchmarks, without touching code, commands, or error text, which we think is pretty impressive, and can pair nicely with rtk to cover input and output. Toggle it on with /caveman, and run /caveman-stats to see tokens saved.
Aider
Aider is a terminal-based AI pair programmer that never dumps your whole codebase into context.
It builds a ârepo mapâ of function and class signatures so the model can reason about files it hasnât seen, without needed to read them, and edits land as diffs rather than full rewrites. âArchitect modeâ (aider --architect) pairs a strong planning model with a cheaper editing one, and /tokens mid-session breaks down exactly whatâs filling your context.
Repomix
When you do need to hand over a chunk of a repo, Repomix packs exactly the files you specify into one clean file instead of a raw dump. Also, its --compress flag uses tree-sitter to strip implementations down to signatures, cutting token count by roughly 70% while keeping structure intact. Built-in token counting (--token-count-tree) shows you which files are actually eating your budget, which is great for a more granual understanding of whatâs happening.
mcp-compressor
Every MCP server you connect loads its full tool schema into every request â sometimes tens of thousands of tokens before youâve asked anything. mcp-compressor proxies any MCP server and swaps that upfront dump for a compact tool list, fetching full schemas only when a tool is actually called.
For example, mcp-compressor -c medium -- python server.py wraps a server at a chosen compression level (ie medium).
ccusage
You canât fix what you canât see. npx ccusage reads local usage logs and gives daily, weekly, and per-session breakdowns across Claude Code, Codex, Copilot CLI, Gemini CLI, and a dozen other tools â all offline, without anything uploaded.
Between compressing what tools spit back (rtk), compressing what the model says back (Caveman), curating what goes in (Aider, Repomix), trimming protocol overhead (mcp-compressor), and watching where it all goes (ccusage) â that covers input, output, and visibility.