> Markdown version of [/magazine/746-6-open-source-tools-to-reduce-your-token-usage](https://www.wearedevelopers.com/magazine/746-6-open-source-tools-to-reduce-your-token-usage). Every page supports `.md` or `Accept: text/markdown`. Links point to the HTML versions so they work for humans too. Agent guide: [/agents.md](https://www.wearedevelopers.com/agents.md). --- # 6 Open-Source Tools to Reduce Your Token Usage **By:** [Daniel Cranney](https://www.wearedevelopers.com/@daniel-cranney) **Published:** July 31, 2026 Token-usage has been a hot topic in recent months, with some big providers switching to [usage-based billing](https://github.blog/news-insights/company-news/github-copilot-is-moving-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](https://finance.yahoo.com/sectors/technology/articles/company-blew-500m-claude-ai-173519468.html)), 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](https://danielabaron.me/blog/how-i-stopped-running-out-of-tokens/), 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](https://github.com/tree-sitter/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. ## Related Articles - [A 5-Step Open-Source Setup for Agentic Engineering](https://www.wearedevelopers.com/magazine/738-a-5-step-open-source-setup-for-agentic-engineering) - [9 Claude Code Skills to Speed Up Your Workflow](https://www.wearedevelopers.com/magazine/740-9-claude-code-skills-to-speed-up-your-workflow) - [13 AI Tools for Developers](https://www.wearedevelopers.com/magazine/302-13-ai-tools-for-developers) - [The Claude Code Source Leak](https://www.wearedevelopers.com/magazine/725-the-claude-code-source-leak) ## Related Videos - [From minutes to seconds: Lessons learned optimizing multi-turn agentic workflows](https://www.wearedevelopers.com/videos/2078-from-minutes-to-seconds-lessons-learned-optimizing-multi-turn-agentic-workflows) - [Measuring the Wrong Things Faster Than Ever](https://www.wearedevelopers.com/videos/100317-measuring-the-wrong-things-faster-than-ever) - [Ship Smarter Agents, Not Bigger Prompts](https://www.wearedevelopers.com/videos/100010-ship-smarter-agents-not-bigger-prompts) - [MCP doesn’t suck — your agent does](https://www.wearedevelopers.com/videos/100202-mcp-doesn-t-suck-your-agent-does) ## Related Jobs - [Staff Software Engineer, Copilot Experiences](https://www.wearedevelopers.com/jobs/ext/164361-staff-software-engineer-copilot-experiences) at **GitHub** - [Engineer, Offensive Security Organization](https://www.wearedevelopers.com/jobs/ext/1992296-engineer-offensive-security-organization) at **Twilio** - [Senior Backend Developer — AI: MCP & Agent Engine](https://www.wearedevelopers.com/jobs/48297-senior-backend-developer-ai-mcp-agent-engine) at **basebox GmbH** - [AI Software Engineer (Germany)](https://www.wearedevelopers.com/jobs/48317-ai-software-engineer-germany) at **Sunhat** - [Senior Software Engineer, Client Apps Platform](https://www.wearedevelopers.com/jobs/ext/1773893-senior-software-engineer-client-apps-platform) at **GitHub** - [Devops Engineer](https://www.wearedevelopers.com/jobs/ext/1940926-devops-engineer) at **Bitpanda**