RTK

A Rust CLI proxy that compacts output from git, tests and other commands so the agent spends fewer tokens reading the terminal

CLIMedium risk

rtk-ai/rtk

Install

brew install rtk

Windows: winget install rtk-ai.rtk. Linux and macOS without Homebrew: the install.sh script from the README.

This is third-party code. Review the repository files before installing.

What it does

RTK sits between the agent and the shell: a hook rewrites commands like git status into rtk git status, and the agent gets compact output without noise. rtk init wires up a hook or plugin for Claude Code, Copilot, Gemini CLI, Codex, Cursor, Windsurf, Cline and other agents. rtk gain shows how much output was saved. It is a single dependency-free binary installed via Homebrew, winget, a script or Cargo.

Who it is for. For developers whose agent works heavily in the terminal and quickly hits context or subscription limits.

Good fit when

  • The agent often runs git, tests and builds with long output
  • The session context fills up with command noise
  • You want one solution across several agents

Not a fit when

  • The agent mostly reads files with built-in tools rather than bash
  • You need full untrimmed command output for debugging

Example request

Set up RTK for Claude Code and show how many tokens it saved today

Limitations

The hook only applies to Bash calls: Claude Code built-ins such as Read, Grep and Glob bypass it. crates.io has an unrelated rtk package, so install from the git repository when using Cargo.

How to disable. Remove the RTK hook from the agent settings and delete the binary, for example brew uninstall rtk or remove it from ~/.local/bin.

Security check

  • The hook rewrites the agent's shell commands before execution

README in short

The README lists install options: Homebrew, winget, a Linux and macOS script, Cargo from git and prebuilt binaries. Quick start is rtk init with the flag for your agent and a restart. It explains hook-based versus plugin-based agents, the built-in tools limitation and a warning about a same-named package. Apache-2.0 licensed.

FAQ

Does the agent need to call rtk explicitly?

No, the hook or plugin rewrites commands before they run.

Does it work on Windows?

Yes, there is a winget package and a Windows build; hooks work natively and in WSL.

Editors’ pick

A skills library that gives coding agents a development process: brainstorming, planning, TDD, subagents and code review

PluginMedium risk286.6K
Editors’ pick

Small composable skills for engineering with agents: plan grilling, TDD, bug diagnosis, code review and architecture

SkillLow risk262K

Reference MCP servers

Model Context Protocol servers

Editors’ pick

Official reference MCP servers: Filesystem, Fetch, Git, Memory, Sequential Thinking, Time and Everything

MCP serverMedium risk90.3K
Editors’ pick

Up-to-date, version-specific library docs and code examples in your agent's context, via MCP or a CLI plus skill

MCP serverMedium risk62K