CLI proxy that reduces LLM token consumption by 60-90% on dev commands RTK, an open-source Rust-based CLI proxy from the rtk-ai project, intercepts shell commands and compresses their output before it reaches an AI coding agent's context, cutting bash output size by up to 90% across 100+ supported commands with under 10ms of overhead. The project states the reduction applies to bash output only — one contributor to input tokens alongside the prompt, system prompt and conversation history — and that its token counts are estimated as bytes divided by 4, so percentages are reliable but absolute token figures are approximate. RTK ships as three downloads: the full `rtk` edition (Apache-2.0 plus BUSL-1.1, with hooks, filters and engine), an Apache-2.0-only `rtk-oss` edition, and `rtk-proxy` (BUSL-1.1) for compressing API traffic; the two `rtk` editions install a binary of the same name and cannot be installed together. Agent-agnostic token optimization: compress, route, filter, and more. One composable pipeline across everything your AI agent reads and sends — built on RTK's battle-tested bash-output compression up to 90% smaller . Website https://www.rtk-ai.app • Install installation • Troubleshooting https://www.rtk-ai.app/guide/resources/troubleshooting • Architecture https://github.com/rtk-ai/rtk/blob/develop/docs/contributing/ARCHITECTURE.md • Discord https://discord.gg/RySmvNF5kF English https://github.com/rtk-ai/rtk/blob/develop/README.md • Francais https://github.com/rtk-ai/rtk/blob/develop/README fr.md • 中文 https://github.com/rtk-ai/rtk/blob/develop/README zh.md • 日本語 https://github.com/rtk-ai/rtk/blob/develop/README ja.md • 한국어 https://github.com/rtk-ai/rtk/blob/develop/README ko.md • Espanol https://github.com/rtk-ai/rtk/blob/develop/README es.md • Português https://github.com/rtk-ai/rtk/blob/develop/README pt.md rtk filters and compresses command outputs before they reach your LLM context. Single Rust binary, 100+ supported commands, <10ms overhead. Angular builds are supported with rtk ng build : compact build tables with every bundle and diagnostic retained. RTK intercepts shell commands and compresses their output before your agent reads it. | Operation | What RTK does to the output | |---|---| | ls / tree | Tree format with file counts instead of one line per entry | | cat / read | Smart file reading: signatures and structure over full bodies | | grep / rg | Truncates long lines, groups matches by file | | ast-grep | Groups structural matches by file, caps overflow | | git status | Compact stat format, grouped by state | | git diff | Reduced context, headers stripped | | git log | Hash, author and subject only | | git add/commit/push | Confirmation line instead of full progress output | | cargo test / npm test | Failures only, passing tests collapsed to a count | | ruff check | Grouped by rule and file | | sqlfluff lint | Grouped by rule and file | | pytest | Failures only, traceback trimmed | | go test | NDJSON parsed, failures only | | docker ps | Essential fields only | RTK reduces the bash output your agent reads. That is what RTK measures, and it is not the same as cutting your bill by the same amount. Bash output is one contributor to input tokens , alongside your prompt, the system prompt and conversation history. Input tokens are in turn only part of the bill , which also counts output tokens. The reduction dilutes at every step. The token counts RTK reports are estimated as bytes / 4 — RTK ships no tokenizer, so the percentages are reliable but the absolute token numbers are approximate . Full explanation: How RTK Savings Work https://github.com/rtk-ai/rtk/blob/develop/docs/guide/resources/savings-explained.md brew install rtk macOS / Linux winget install rtk-ai.rtk Windows curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh | sh Then check you have the right package — another project named "rtk" exists on crates.io: rtk --version any current version rtk gain must show the savings dashboard, not "command not found" Cargo, pre-built binaries, native Windows, WSL, and uninstall: Installation guide https://www.rtk-ai.app/guide/getting-started/installation RTK ships as three downloads. The two rtk editions install a binary with the same name — hooks, scripts and agent config work unchanged across both — so they cannot be installed together. Uninstall one before installing the other. flowchart TD agent "Your coding agent" subgraph editions "Pick one · both install a binary named rtk" direction LR full "