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
- FA score
- 62/100 · Some gaps
At a glance
- How it runs
- Works with
- Universal · cross-platformCodex · Claude Code
- Cost
- Free, no paid service needed
- Setup effort
- Low · running in minutes
- You'll need
- 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.
- Developers using Claude Code or Codex who frequently inspect Git status and diffs and want less terminal output in context.
- Teams running large
cargo test,npm test, orpytestsuites that want failures surfaced without full passing-test logs. - Engineers searching or browsing large repositories with
rg,grep,ls, ortreewho want grouped or condensed output. - Teams maintaining projects in several languages that want one CLI for common Rust, JavaScript, Python, and Go commands.
- Developers who want to track command-output optimization with
rtk gainand find uncovered opportunities withrtk 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 rtkwinget install rtk-ai.rtkcurl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh | shrtk --version
rtk gainHow 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 --codexgit status
rtk gainWhat are this agent's strengths and limitations?
- 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, andrtk sessionfor inspecting usage and optimization opportunities.
- Automatic rewriting applies only to Bash tool calls; built-in
Read,Grep, andGlobcalls 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-proxydaemon, and the README explicitly identifies onlyrtk claudeas 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?
Why each dimension lost points
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.
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.
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.
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.
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.
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.
- 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.
FAQ
Will my API bill fall by the same percentage RTK reports?
Does RTK process every file read and search by the assistant?
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?
rtk-proxy handles API traffic between an assistant and a model provider.Does RTK collect command or file contents?
rtk telemetry enable.Are all RTK components licensed under Apache-2.0?
rtk-engine. The rtk-oss edition contains Apache-2.0 components only, without the engine.