Skip to content

RTK

AI エージェントはノイズに埋もれている。
RTK が片づける。

クリーンなコンテキスト。
より賢いエージェント。

オープンソース · Apache 2.0 · Rust

図:トークンの密なグリッドが AI コンテキストウィンドウの 86% を占め、自動圧縮の直前です。RTK フィルターを通ると CLI 出力のノイズが取り除かれ、意味のある行が残ります:同じウィンドウが 73% 使用まで下がり、考える余地が生まれます。

4M+
ダウンロード
85.5K+
GitHub スター
140K+
開発者
125+
コマンド
18
AI コーディングツール

スターを付けた開発者の所属企業

  • Microsoft
  • Google
  • Amazon
  • Meta
  • Apple
  • NVIDIA
  • IBM
  • Tencent
  • ByteDance
  • Alibaba
  • Shopify
  • Datadog
  • SAP
  • Adobe
  • Intel
  • Samsung
  • Bosch
  • Cisco

ほか 1,100 社

01 / 問題

エージェントが読むすべてに、料金がかかる

エージェントは毎ターン、コンテキスト全体をモデルに送り直します。システムプロンプト、ツール、メモリ、会話、そして読み込んだすべてのログ、ファイル、Webページ。そのすべてに、毎回料金がかかります。

図:1回のコーディングセッションでコンテキストウィンドウに入るトークンをレイヤーごとに表示:ツール一覧とシステムプロンプト、会話、ターミナル出力、読み込んだファイル、Web と MCP の結果。RTK を使うと、会話とツールが返すすべての内容が縮小し、ツール一覧とシステムプロンプトはそのまま。合計は 323k から 200k トークンへ、38% 減少します。

説明用の例です。

02 / コア

The compressor with 4M+ downloads

シェルコマンドを書き換え、エージェントが読む前に出力からノイズを取り除きます。

開発者のために

言語 Rust
ライセンス Apache 2.0
アーキテクチャ フックと RTK Proxy
オーバーヘッド < 20 ms
コマンド 125+
テレメトリ オプトイン、個人データなし
rtk gain ライブダッシュボード:コマンドフィルタリングの節約量、RTK Proxy のリクエストとキャッシュヒット、コンテキスト構成、コマンド別の節約量
44.4% 削減

日常利用のライブ rtk gain:41,502 コマンド、470 万トークンを節約。

03 / RTK Engine

完全なコスト削減エンジン

56% less command output on average, up to 90% on the noisiest. And with RTK Engine: route, build, plug in, share — in any agent.

RTK Engine の発表を読む

圧縮とフィルタリングコア

1,200 行のロックファイルが短いパッケージ一覧になります。

ルーティング

4,000 行のファイルは小さなモデルが要約し、エージェントはファイルではなく答えを受け取ります。

構築

「diff はそのまま、それ以外は圧縮」

プラグイン

誰かが自分のスタック向けにメソッドを書けば、どのパイプラインでも使えます。

共有

リードがパイプラインを共有し、みんなは置くだけ。

どのエージェントでも

同じファイルを、ある人は Claude Code で、別の人は Cursor で使う。

04 / 自分仕様にする

ひとつのファイル。どのエージェントでも。

ルールは、RTK がどこで、いつ、何をするかを記述します。組み込みパイプラインから始めて一行変えるか、自分で書くか。あとはひとつのファイルとして共有するだけ。

RTK 自身のパイプラインも同じ形式で書かれているので、白紙から始める必要はありません。rtk pipeline show rtk:default で今日動いている内容を表示できます。

パイプラインガイドを読む

パイプラインファイル:組み込みの rtk:posthook と rtk:proxy パイプラインを拡張し、ルールをひとつ追加します——どこで:エージェントがファイルを読む前;いつ:ファイルが 350 行を超えるとき;何を:読み取りを安価なモデルにルーティング。

対応エージェント Claude CodeCursorCodexGemini CLI +14

Acts in the agent — hooks on the API traffic — RTK Proxy, optional

05 / 実測データ

成果を見せて、パイプラインを共有しよう

rtk gain で RTK による節約量を確認し、その裏にあるパイプラインをコマンドひとつで共有しましょう。

図:rtk gain が RTK による節約量を表示(ここでは 470 万トークン、コマンド出力 44% 削減)。rtk pipeline share でその裏にあるパイプラインを非公開または公開のリンクにし、Claude Code、Cursor、Codex など 18 のエージェントで使えます。

コミュニティのパイプライン

RTK ユーザーが共有したパイプライン(GitHub の rtk-pipeline トピック)。コマンドひとつでインストール、または自分のものを公開できます。

rtk pipeline add github:user/repo
パイプラインをインストール。RTK はルールを表示し、インストール前に確認します。
rtk pipeline share publish
自分のパイプラインを、計測した節約量とともに GitHub に公開。

インストール前に確認を。パイプラインはエージェントが実行するコマンドを書き換え、宣言したモデルへ内容を送信できます。RTK は共有パイプラインを審査しておらず、節約量は自己申告です。

コミュニティのパイプラインを見る
Discord の #show-your-gains で他の開発者の節約量を見る

あなたの AI コーディング環境に対応

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Codex
  • Gemini CLI
  • Windsurf
  • Cline
  • OpenCode

Fewer tokens. Lower bill. Same answers.

06 / はじめる

30 秒で動き出す

インストールしてフックを有効化すれば、あらゆるコマンドが自動で圧縮されます。

0.x からのアップグレード?一行追加するまで何も変わりません。

クイックインストール

Linux と macOS 向けのワンライナー。

$ curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh | sh

Homebrew

macOS と Linux。

$ brew install rtk-ai/tap/rtk
$ brew upgrade rtk-ai/tap/rtk

ビルド済みバイナリ

macOS、Linux、Windows。

Releases からダウンロード

次に自動書き換えフックを有効化

$ rtk init --global

Claude Code の settings.json に PreToolUse フックを追加し、すべての Bash 呼び出しを自動で書き換えます。

完全インストールガイド →

よくある質問

よくいただく質問

What is RTK (Rust Token Killer)?

RTK is a cost reduction engine for AI coding agents. It cleans what your agent reads at every tool call — shell output, file reads, search results, web pages, MCP calls — cutting up to 90% of command output noise, and it can hand heavy work to cheaper models. The battle-tested Bash compressor developers starred is the core of the engine. RTK is free to use, written in Rust, with the CLI open source under Apache 2.0, and works with Claude Code, Cursor, and 18 AI coding agents.

What is RTK Engine?

RTK Engine turns the battle-tested compressor into a full cost reduction engine. RTK can now compress every tool's output, not just shell commands, route heavy work to cheaper models, and let you build your own pipeline, plug in new methods, and share your setup as one file that works in any supported agent. Upgrading changes nothing: RTK works exactly as before until you add a line.

What is a pipeline?

One file of rules. Each rule reads like a sentence: where RTK acts, when, and what it does — for example, when the agent reads a file longer than 350 lines, send it to a cheaper model. RTK's own behaviour is written in the same format, so you never start from a blank page: pick a built-in pipeline, change one line, or write your own.

Can I share a pipeline with my team?

Yes. A pipeline is one file: share it, drop it in, and it works in any supported agent. The same file can be used in Claude Code by one person and Cursor by another.

Do I need to change anything when I upgrade to RTK Engine?

No. Install, run rtk init, and RTK works exactly as before. Nothing changes until you add a line to a pipeline. The compressor you already rely on is the core of the engine, not a feature that moved.

How many tokens does RTK actually save?

On the commands RTK rewrites, output drops by 56% on average, and by up to 90% on the noisiest ones. Across the community that adds up to billions of tokens saved. The exact figure depends on the command, so the benchmarks page publishes the methodology and the per-command results, and the blog covers what independent studies measured, including the cases where RTK did not come out ahead. For your own numbers, run rtk gain after a few days of use.

Is RTK free? Are there usage limits?

RTK is completely free. It is open source under the Apache 2.0 license, with source code available on GitHub at github.com/rtk-ai/rtk. There are no usage limits, no API keys required and no accounts. Routing to a cheaper model is optional and uses a model key you provide. Telemetry is opt-in: it is off until you explicitly enable it, and it collects no personal data. For teams, RTK Pro is available at pro.rtk-ai.app.

Which AI coding tools and commands does RTK support?

RTK works with 18 AI coding agents, including Claude Code (Anthropic), Cursor, GitHub Copilot, Codex, Gemini CLI, Windsurf, Cline and Aider — and the engine acts on every tool an agent uses: shell commands, file reads, search, web fetches and MCP calls. On the shell side it covers 125+ commands: cargo test, pytest, go test, git diff, git status, git log, grep, find, ls, pnpm list, tsc, eslint, prisma, docker, kubectl, and more.

How does RTK work without changing my workflow?

Running rtk init --global installs hooks inside your agent that act around each tool call: shell commands are automatically rewritten to rtk equivalents, and output is compressed before it enters the context window. If you turn it on, the RTK Proxy also acts on the API traffic, trimming what the agent sends to the model. You continue using your normal commands, with no manual changes to prompts or workflows needed.

Does RTK affect code quality or AI reasoning accuracy?

No. RTK removes verbose boilerplate and repetitive output noise, not meaningful content. Test failures, error messages, diffs, and stack traces are preserved in full. The AI receives the same essential information with far less noise around it, which leaves more of the context window for reasoning.

エージェントに
考える余地を

構築。プラグイン。共有。どのエージェントでも。

RTK をシェア

RTK Pro

チームのための AI コントロールレイヤー

RTK は各開発者のマシン上で動きます。RTK Pro はそれらのマシンをひとつのコントロールレイヤーにつなぎ、コスト分析、セキュリティガードレール、ガバナンスでチーム全体を立ち上げます。

  • オブザーバビリティ

    チーム全体の詳細な分析:プロジェクト別・開発者別の利用状況とコスト。何が本当にコストなのかを把握し、実際のトークン効率指標を定義できます。

  • セキュリティ

    オンボードした開発者は最初からガードレールの内側で作業します。シークレットの漏洩を防ぎ、危険な操作を止め、機微なデータを匿名化します。

  • ガバナンス

    きめ細かい RBAC、ACL、プロジェクト管理。新しいメンバーは一度つなぐだけで、圧縮、ガードレール、オブザーバビリティ、スキル、MCP がすべて揃います。

RTK Pro を見る

CLI は無料でオープンソースのままです。