Back to directory

rtk

rtk is a Rust CLI proxy that filters and compresses command output before it reaches a coding agent's context, cutting the bash output an agent has to read across more than 100 supported commands.

rtk

Hook-based agents rewrite a bash command, such as turning "git status" into "rtk git status", before it runs, while plugin-based agents rewrite commands through their own plugin API; either way the agent gets compact output without calling rtk directly. The hook only covers Bash tool calls, so an agent's built-in read, search or file-listing tools are not automatically rewritten unless invoked as shell commands instead.

Four strategies produce the savings: filtering out noise such as comments and whitespace, grouping similar items like files by directory or errors by type, truncating output while keeping relevant context, and deduplicating repeated log lines with counts. It ships as a single Rust binary with no dependencies, and running it does not interfere with an LLM provider's prompt caching.

Rust, Apache-2.0.

More in CLI tools

See all 181
  • grev

    github.com

    A set of Unix coreutils-style filters — grep, sort, cut and more — that answer a plain-language question about each record instead of matching a pattern, using a small decision model.

  • A Node.js script that exports a Google Doc to HTML and CSS with high fidelity, preserving headings, spacing, alignment, bullet lists, images and right-to-left text.

  • gpusched

    github.com

    A VRAM-aware GPU job scheduler for a single machine: declare how much memory each shell command needs, and it places jobs the moment a GPU has room and reports when a guess was wrong.