AI Briefing
KO

rtk - a CLI proxy that cuts LLM token consumption by 60-90%

·2026.04.06 10:06

Key point

A Rust-based proxy has been released that compresses CLI output from AI coding tools to reduce LLM token consumption by up to 90%.

Details

Provided as a single Rust-based binary, rtk is a proxy tool that filters and compresses the output of CLI commands run by AI coding tools before passing it to the LLM.

Key Features and Characteristics

  • 4 optimization strategies: Applies smart filtering, grouping, truncation, and deduplication to manage tokens efficiently.
  • Broad command support: Supports over 100 commands, including git, grep, ls, and cargo test.
  • AI tool compatibility: Supports over 10 AI coding tools including Claude Code, Cursor, Codex, and Gemini CLI, and provides a hook feature that automatically rewrites shell commands into rtk commands.

Expected Benefits

  • In a Claude Code session using around 118,000 tokens, usage can be reduced to about 23,900 (about 80%).
  • In test runner environments such as cargo test, pytest, and go test, token usage can be reduced by up to 90%.

Considerations

  • Because the data compression may cause the LLM to not have sufficient context, there is a possible quality trade-off, so caution is needed depending on the usage environment.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.