RTK Command Output Optimizer

Filter and compress terminal output before coding assistants read it, reducing redundant context.

Source repo
rtk-ai/rtk
Stars
★ 84k
Last updated
today
License
Apache-2.0
Primary language
Rust

At a glance

How it runs
CLIAgent plugin / skillSelf-hosted service
Works with
Universal · cross-platformCodex · Claude Code
Cost
Free, no paid service needed
Setup effort
Low · running in minutes
You'll need
Shell / CLILocal filesystem
Typical use
Developers using Claude Code or Codex who frequently inspect Git status and diffs and want less terminal output in context.
Not a fit if
  • Teams that need to compress built-in Read, Grep, or Glob tool output
  • Teams requiring Apache-2.0-only components while using the compression engine
Source review
62/100 · Some gaps

What does this agent do, and when should you use it?

RTK is a Rust CLI that uses hooks to rewrite supported shell commands as rtk equivalents. It runs the command and filters, groups, truncates, or deduplicates the output by command type before returning the reduced text to a coding assistant. The README lists more than 100 commands across Git, tests, search, build, container, and cloud tooling, with integrations for Claude Code, Codex, Gemini CLI, Cursor, and others. After installation, rtk gain reports savings statistics, and users can also invoke rtk subcommands directly. The optional rtk-proxy is a separate daemon for handling configured model API traffic; basic command filtering does not require it.

RTK installs hooks or rules for a coding assistant and rewrites supported shell commands when the assistant invokes them through its Bash tool. RTK runs the command and passes its output through a command-specific filter. For example, git status becomes a grouped summary, test commands show failures while collapsing passes, and file listings can be rendered as trees. The filtered text returns to the assistant; rtk gain, rtk discover, and rtk session expose statistics and optimization opportunities. The README says built-in Read, Grep, and Glob tool calls do not pass through the Bash hook.

  1. Developers using Claude Code or Codex who frequently inspect Git status and diffs and want less terminal output in context.
  2. Teams running large cargo test, npm test, or pytest suites that want failures surfaced without full passing-test logs.
  3. Engineers searching or browsing large repositories with rg, grep, ls, or tree who want grouped or condensed output.
  4. Teams maintaining projects in several languages that want one CLI for common Rust, JavaScript, Python, and Go commands.
  5. Developers who want to track command-output optimization with rtk gain and find uncovered opportunities with rtk discover.

How do you install or deploy this agent?

RTK documents installation through Homebrew, Windows Package Manager, and an install script. Check the installed version with rtk --version and confirm the command is available with rtk gain. The Apache-2.0-only rtk-oss edition is also available; the README says the full rtk edition includes the BUSL-1.1-licensed compression engine.

brew install rtk
winget install rtk-ai.rtk
curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh | sh
rtk --version
rtk gain

How do you use this agent?

Initialize the integration for your coding assistant, then restart it. These examples show the default setup for Claude Code or Copilot and setup for Codex. Once configured, supported commands invoked through the assistant's Bash tool are rewritten automatically; you can also run rtk commands yourself. Built-in read, search, and file-matching tools bypass this hook.

rtk init -g
rtk init -g --codex
git status
rtk gain

What are this agent's strengths and limitations?

Pros
  • A single Rust binary provides more than 100 command filters; the README reports less than 10 ms of processing overhead.
  • Documents direct setup integrations for coding tools including Claude Code, Codex, Gemini CLI, and Cursor.
  • Applies command-specific output handling, including test-failure filtering, Git summaries, grouping, and repeated-log collapsing.
  • Includes rtk gain, rtk discover, and rtk session for inspecting usage and optimization opportunities.
Limitations
  • Automatic rewriting applies only to Bash tool calls; built-in Read, Grep, and Glob calls bypass the hook.
  • Token counts are estimated as bytes divided by four; percentages are presented as reliable, but absolute token counts are approximate.
  • The full edition includes a BUSL-1.1-licensed engine; the grant does not cover offering RTK or a derivative to third parties as a commercial service.
  • Proxy traffic optimization requires the separate rtk-proxy daemon, and the README explicitly identifies only rtk claude as a harness launcher with verified redirection.

How does this agent compare with similar options?

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
RTK Command Output Optimizer This agent 62 · Some gaps CLIFree ★ 84k today Rust Codex · Claude Code
Destructive Command Guard (dcg) 61 · Some gaps CLIFree ★ 6.2k today Rust Codex · Claude Code
Diri 59 · Major gaps Desktop appFree + model costs ★ 454 today Rust Codex · Claude Code
Plannotator 78 · Good CLIFreemium ★ 9.5k today TypeScript Codex · Claude Code

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Some gaps
62/ 100 5-point scale 3.1 / 5
Trust 13/29
Reliability 6/14
Adaptability 14/18
Convention 14/18
Effectiveness 9/13
Verifiability 6/8
Why each dimension lost points
Trust13 / 29 · 2.2/5

The README says command and file contents are not collected by default and telemetry requires explicit opt-in. The Hermes plugin acts only on terminal commands and preserves the original command when rewriting fails. Install scripts, proxy forwarding, and initialization that writes configuration have external effects, while the supplied material does not provide a complete permission inventory or rollback details, limiting scores for least privilege, sensitive-data handling, rollback, and external effects. The private reporting channel and contributor security process are described, but publisher identity is unverified, so attribution remains limited.

Reliability6 / 14 · 2.1/5

The materials describe multi-platform CI, security checks, and fail-open behavior that preserves the original command; the Hermes test file covers several error paths. However, the CI/CD overview is only partly corroborated by the supplied workflow file, and no dependency lockfile or availability evidence is supplied, so consistency and dependency availability score low. Warning and fallback behavior are described concretely.

Adaptability14 / 18 · 3.9/5

The README names use cases across coding agents, development commands, and operating systems, and identifies boundaries such as hooks applying only to Bash calls while built-in Read/Grep/Glob tools bypass them. Integration methods vary by agent and coverage is broad. The claim of 18 supported tools does not fully match the number shown in the table, and some environment compatibility details depend on external guides.

Convention14 / 18 · 3.9/5

The README is well organized and includes installation, quick start, operation guidance, troubleshooting links, examples, and licensing information. Cargo metadata gives version and Rust requirements, and the security policy describes maintenance processes. Installation details, release history, and some limitations depend on external documentation. Apache metadata coexists with the README's BUSL licensing for the engine and proxy, so license terms must be checked by edition; maintainers are named, but publisher identity is unverified.

Effectiveness9 / 13 · 3.5/5

Command-output compression, failure summaries, a savings dashboard, and configurable pipelines show practical value for coding-agent workflows. The README distinguishes output reduction from bill reduction and says token counts use an approximate bytes/4 estimate. Savings percentages remain project claims without independent measurement in the supplied materials; readers must assess the costs and applicability of proxy traffic compression versus command-output filtering.

Verifiability6 / 8 · 3.8/5

The README links feature, telemetry, installation, and licensing claims to specific documents; the Cargo manifest, license, security policy, and Hermes test source provide partial cross-checks. Key claims such as savings percentages and coverage are not independently verified in the supplied materials. The README does distinguish measurable bash-output reduction, approximate token counts, and total billing, which supports clear separation of facts and estimates.

Risks and how to mitigate them
  • The supplied materials do not independently validate the 60–90% savings claim; the README says absolute token counts are estimated as bytes/4 and should not be treated as bill reductions.
  • Installation and proxy features can rewrite commands or configuration and may forward proxy traffic to a model provider; confirm the selected edition, configuration, and license boundary before deployment.
  • The README claims support for 18 AI tools, but the number listed in its table does not fully match that claim.
Evidence confidence: Low Reviewed Oct 20, 2026 Reviewed revision 5538d72b1d0b
See the full review method →

FAQ

Will my API bill fall by the same percentage RTK reports?
That does not follow directly. RTK reduces Bash output the assistant reads; input tokens also include prompts and conversation history, and billing includes output tokens. RTK estimates token counts as bytes divided by four.
Does RTK process every file read and search by the assistant?
No. The hook applies to Bash tool calls; built-in Read, Grep, and Glob calls bypass it. The README suggests shell commands such as cat, rg, and find, or direct rtk read, rtk grep, and rtk find commands.
Do I need an API key for basic command filtering?
The installation and quick-start sections do not require one. The optional rtk-proxy handles API traffic between an assistant and a model provider.
Does RTK collect command or file contents?
The README says RTK collects no command or file contents. Anonymous telemetry is off by default and sends nothing until explicitly enabled with rtk telemetry enable.
Are all RTK components licensed under Apache-2.0?
No. The README identifies the CLI as Apache-2.0 and says the full edition links the BUSL-1.1-licensed rtk-engine. The rtk-oss edition contains Apache-2.0 components only, without the engine.
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related agents