RTK Command Output Optimizer
Filter and compress terminal output before coding assistants read it, reducing redundant context.
- Source repo
- rtk-ai/rtk
- Stars
- ★ 89k
- Last updated
- 4d ago v1.3.0
- FARS reviewed
- Nov 07, 2026 +3 new
- License
- Apache-2.0
- Primary language
- Rust
- FA score
- 72/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
- Website
- rtk-ai.app ↗ set on GitHub
- Maintenance
- Commits in the last 30 dayslast commit 2026-12-01latest release v1.3.0 (2026-11-30)+109.1 ★/day over 7 days
- Source review
- 72/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.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Install / run
brew install rtkwinget install rtk-ai.rtkcurl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh | sh
- Install notes cover
- Windows · macOS
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 gainSafety boundaries, hardening & integrations
Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.
Declared capability surface (blast radius)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Modifies local files; work on a clean Git branch or dedicated worktree.
What 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 | 72 · Some gaps | CLIFree | ★ 89k | 4d ago | Rust | Codex · Claude Code |
| Paks | 42 · Major gaps | CLIFree | ★ 67 | 5mo ago | TypeScript | Codex · Claude Code |
| Diri | 75 · Good | Desktop appFree + model costs | ★ 507 | 5d ago | Rust | Codex · Claude Code |
| TokenEconomizer | 75 · Good | Agent plugin / skillFree + model costs | ★ 8.4k | 4d ago | Python | Codex · Claude Code |
How does FollowAgents rate this agent?
Why each dimension lost points
The source describes loopback binding by default, refusal of non-loopback service installation, and a warning for foreground non-loopback binds because credentials are forwarded. The plugin preserves explicit deny and ask rules. Telemetry is described as opt-in with no command or file contents collected, and a private security-reporting process is documented. Deductions: the privacy claims are not independently corroborated by the supplied implementation; the proxy forwards caller credentials and can still be exposed through an explicit foreground bind; the install example pipes a downloaded script to a shell, and the command proxy executes underlying commands.
The docs, Rust manifest, and proxy entry point describe a recognizable CLI, engine, and separate proxy structure, and contributor guidance describes falling back to raw command execution on filter failure. Deductions: the candidate description says “zero dependencies,” while Cargo.toml lists many dependencies; README licensing spans Apache-2.0 and BUSL-1.1 components, which can be confusing beside the Apache-only package metadata. Availability of external commands and install channels is not established by these files.
README lists multiple development ecosystems, 18 AI tools, and their integration methods, and identifies limits such as built-in read/search tools bypassing Bash hooks and some project-scoped integrations. Exit-code behavior, bypass, and proxy boundaries are also documented. Deduction: activation depends on host hook support, and coverage and behavior remain contingent on the host and external commands.
README is organized around installation, quick start, supported tools, proxy, pipelines, analytics, and licensing; it includes multilingual entry points, examples, troubleshooting, and limitations. CLAUDE.md reads as contributor guidance rather than a required product manifest. Deductions: package metadata says Apache-2.0 while the default full build links a BUSL-1.1 engine; README explains the boundary but users must distinguish the editions. The supplied material lacks a clear changelog, and maintenance responsibility is supported mainly by a named team, contribution guidance, and security policy.
Filtering strategies and command examples show how output is reduced; README distinguishes Bash output reduction from input tokens and billing, and says bytes/4 is only an estimate. Bypass and analytics commands offer practical inspection paths. Deductions: the 60–90% savings claims are not backed by measurements in the supplied static material, and whether filtered output retains what a task needs depends on the use case.
Some README claims about compression scope, licensing, telemetry, and proxy behavior are supported by the Cargo manifest, proxy entry point, and plugin source; performance and security policies describe check methods. Deductions: many coverage, performance, and privacy claims remain documentation assertions in the supplied files, with no execution evidence. This review distinguishes source statements from unexecuted verification.
- Check the edition and its license before installing: the default full build includes the BUSL-1.1 engine, and an Apache-2.0 OSS edition is also described.
- Filtering changes command output; use rtk bypass to inspect raw output when a result looks incomplete or suspect.
- The proxy forwards credentials supplied by the client; keep it loopback-bound unless an appropriate network boundary is in place.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
-
dev-1.3.1-rc.709 Pre-release
-
Release notes excerpt
[1.3.0](https://github.com/rtk-ai/rtk/compare/v1.2.1...v1.3.0) (2026-11-30) Features * add infra filters for terraform, nix, ansible, and opentofu ([29f09c3](https://github.com/rtk-ai/rtk/commit/29f09c3d820f4ca44a5eec56c0b89998af13731b)) * tracking: measure recall output by invocation ([97e68d5](https://github.com/rtk-ai/rtk/commit/97e68d5358aa5d91d1540ea64df58c9688bcf83d)) Bug Fixes * build: parse combined filters as TOML table ([542218a](https://github.com/rtk-ai/rtk/commit/542218a6d687184ea068ed81d9c1ce11d27ca835)) …View on GitHub ↗
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.Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.