RTK
rtk-ai
CLI proxy that compresses shell command output before your AI coding assistant sees it, cutting tokens 60-90%.
What is RTK?
RTK is a Rust CLI proxy between your terminal and 14 AI coding tools (Claude Code, Copilot, Gemini, Cursor and more). It intercepts output from 100+ dev commands (git, cargo, pytest, docker) and strips stack traces, redundant diffs and verbose logs before they reach the context window, claiming 60-90% token reduction (project's own claim).
RTK in depth
Anyone running long coding sessions with an AI assistant hits the same wall: the context window fills up with noise. A single git diff, a cargo build log or a verbose pytest run can swallow thousands of tokens the model does not need. That pressure shortens how much real context the assistant can hold, raises cost on metered APIs and can force premature summarization. RTK, short for Rust Token Killer, is a CLI proxy from rtk-ai that sits between your terminal and the AI tool. It intercepts output from over 100 common dev commands and strips the redundant parts before that text ever reaches the model. The project frames the gain as a 60 to 90 percent token reduction, a claim worth treating as the project's own number rather than an independent benchmark.
RTK works by wrapping commands you already run. Its setup installs an auto-rewrite hook that transparently turns something like git status into rtk git status, so compression happens without you changing your habits. Under the hood it applies four passes: filtering out boilerplate, grouping similar items such as files by directory or errors by type, truncating while keeping the relevant context, and deduplicating repeated log lines into counts. What stands out is the per-command specialization. Instead of one generic filter, RTK has distinct logic for git, cargo, jest, kubectl, AWS CLI and the rest. A useful safety detail: on command failure it saves the full unfiltered output, so the assistant can still debug without re-running. The whole thing ships as a single Rust binary with no external dependencies.
RTK is aimed at developers who run agentic coding sessions where shell output dominates the budget. If your Claude Code or Copilot work involves repeated git diff, cargo build and test runs, the savings compound across a session. The project supports 14 AI coding tools out of the box, including Claude Code, GitHub Copilot, Gemini CLI, Cursor and Cline, so a single install covers a mixed toolchain. The Rust implementation keeps the compression pass near instant, and it runs on macOS, Linux, Windows and WSL. Concrete cases: a backend team chasing failing pytest output across many iterations, an infra engineer reading long kubectl and AWS responses, or anyone whose model keeps losing earlier context because routine command logs crowded it out. Telemetry exists but is off by default and opt-in.
The caveats are real and the project is honest about several of them. Output compression is lossy by design: RTK decides what counts as noise, and a stripped stack frame or trimmed diff line is occasionally the one you needed. A large open-issue count suggests the heuristics do sometimes remove useful context, so it is not a fully invisible win. The hook is also narrower than it first appears. It only fires on Bash tool calls, so Claude Code's built-in Read, Grep and Glob tools bypass it unless you switch to shell commands or explicit rtk calls. Native Windows Command Prompt and PowerShell are not properly supported, with WSL recommended instead, and GitHub Copilot CLI only gets a deny-with-suggestion mode. The reduction figures remain the project's own.
There is no direct commercial equivalent that does exactly this, since RTK addresses a gap the AI tools have not closed themselves: it is closer to a sharp utility than a platform. The honest comparison is against doing nothing, against manually piping output through grep and head, or against larger context windows that simply cost more. RTK is worth adopting if you run long, command-heavy agentic sessions where git, build and test output genuinely dominate the budget, and if you are comfortable auditing what gets stripped via the config file. It is too early, or simply unnecessary, if your sessions are short and context pressure is not a problem, or if losing any command detail is unacceptable. Start it on a non-critical project, watch what it removes, and expand from there.
Pros & Cons
Pros
- Supports 14 AI coding tools out of the box from one install
- Rust implementation keeps the compression pass near-zero latency
- Works on Windows and WSL as well as macOS and Linux
Cons
- Very high star count for a dev utility - star velocity worth monitoring
- Large open-issue count suggests the heuristics sometimes strip needed context
- Output compression is inherently lossy - the tool decides what is noise
License
Apache-2.0 (OSI-open)
When it is interesting
Long agentic Claude Code or Copilot sessions where git diff, cargo build and pytest output dominate the context budget.
When it is too early
If your sessions are short and context pressure is not a problem.
This repo featured in the 2026-07 edition of the Open-Source AI Radar.
TOON
toon-format
Token-Oriented Object Notation - a compact serialization format that uses ~40% fewer tokens than JSON.
planning-with-files
OthmanAdi
Crash-proof markdown planning for AI coding agents - persists task state across context loss and /clear.
open-code-review
alibaba
Provider-agnostic AI code-review CLI that emits line-level comments from Git diffs, open-sourced by Alibaba.