RTK开发CLI代理 是 AI Skill Hub 本期精选Agent工作流之一。在 GitHub 上收获超过 49.1k 颗 Star,综合评分 8.8 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。
RTK开发CLI代理 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
RTK开发CLI代理 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
# 方式一:cargo install(推荐) cargo install rtk # 方式二:从源码编译 git clone https://github.com/rtk-ai/rtk cd rtk cargo build --release # 二进制在 ./target/release/rtk
# 查看帮助 rtk --help # 基本运行 rtk [options] <input> # 详细使用说明请查阅文档 # https://github.com/rtk-ai/rtk
# rtk 配置说明 # 查看配置选项 rtk --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export RTK_CONFIG="/path/to/config.yml"
<p align="center"> <img src="https://avatars.githubusercontent.com/u/258253854?v=4" alt="RTK - Rust Token Killer" width="500"> </p>
<p align="center"> <strong>Agent-agnostic token optimization: compress, route, filter, and more.</strong> <br><br> One composable pipeline across everything your AI agent reads and sends — built on RTK's battle-tested bash-output compression (up to 90% smaller). </p>
<p align="center"> <a href="https://github.com/rtk-ai/rtk/actions"><img src="https://github.com/rtk-ai/rtk/workflows/Security%20Check/badge.svg" alt="CI"></a> <a href="https://github.com/rtk-ai/rtk/releases"><img src="https://img.shields.io/github/v/release/rtk-ai/rtk" alt="Release"></a> <a href="#license"><img src="https://img.shields.io/badge/license-Apache--2.0%20%2B%20BUSL--1.1-blue.svg" alt="License: Apache-2.0 and BUSL-1.1"></a> <a href="https://discord.gg/RySmvNF5kF"><img src="https://img.shields.io/discord/1470188214710046894?label=Discord&logo=discord" alt="Discord"></a> <a href="https://formulae.brew.sh/formula/rtk"><img src="https://img.shields.io/homebrew/v/rtk" alt="Homebrew"></a> </p>
<p align="center"> <a href="https://www.rtk-ai.app">Website</a> • <a href="#installation">Install</a> • <a href="https://www.rtk-ai.app/guide/resources/troubleshooting">Troubleshooting</a> • <a href="docs/contributing/ARCHITECTURE.md">Architecture</a> • <a href="https://discord.gg/RySmvNF5kF">Discord</a> </p>
<p align="center"> <a href="README.md">English</a> • <a href="README_fr.md">Francais</a> • <a href="README_zh.md">中文</a> • <a href="README_ja.md">日本語</a> • <a href="README_ko.md">한국어</a> • <a href="README_es.md">Espanol</a> • <a href="README_pt.md">Português</a> </p>
---
<p align="center"> <a href="https://www.star-history.com/rtk-ai/rtk"> <picture><source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/badge?repo=rtk-ai/rtk&type=rank&theme=dark" /><source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/badge?repo=rtk-ai/rtk&type=rank" /><img alt="Star History Rank" src="https://api.star-history.com/badge?repo=rtk-ai/rtk&type=rank" /></picture> <picture><source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/badge?repo=rtk-ai/rtk&type=trending&theme=dark" /><source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/badge?repo=rtk-ai/rtk&type=trending" /><img alt="GitHub Trending Repository of the Day" src="https://api.star-history.com/badge?repo=rtk-ai/rtk&type=trending" /></picture> </a> </p>
rtk filters and compresses command outputs before they reach your LLM context. Single Rust binary, 100+ supported commands, <10ms overhead.
Angular builds are supported with rtk ng build: compact build tables with every bundle and diagnostic retained.
brew install rtk # macOS / Linux
winget install rtk-ai.rtk # Windows
curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh | sh
Then check you have the right package — another project named "rtk" exists on crates.io:
rtk --version # any current version
rtk gain # must show the savings dashboard, not "command not found"
Cargo, pre-built binaries, native Windows, WSL, and uninstall: Installation guide
RTK ships as three downloads. The two rtk editions install a binary with the same name — hooks, scripts and agent config work unchanged across both — so they cannot be installed together. Uninstall one before installing the other.
| Download | Licence | Contains |
|---|---|---|
rtk-<target> | Apache-2.0 + BUSL-1.1 | Hook core, every command filter, **and** the compression engine |
rtk-oss-<target> | Apache-2.0 only | Hook core and every command filter. No engine. |
rtk-proxy-<target> | BUSL-1.1 | The RTK Proxy daemon. Never bundled with either rtk. |
Production use is free, engine and daemon included. What the BUSL grant does not cover is offering RTK or a derivative to third parties as a commercial product or service — for that, contact contact@rtk-ai.app.
curl -fsSL .../install.sh | RTK_EDITION=oss sh # Apache-2.0 edition
brew install rtk-ai/tap/rtk-oss
What the Apache-2.0 edition omits and where the licence boundary falls: Editions and Licensing
rtk init -g # Claude Code / Copilot (default) rtk init -g --gemini # Gemini CLI rtk init -g --codex # Codex (OpenAI) rtk init -g --agent cursor # Cursor rtk init -g --agent windsurf # Windsurf rtk init --agent cline # Cline / Roo Code rtk init --agent kilocode # Kilo Code rtk init --agent antigravity # Google Antigravity rtk init --agent kimi # Kimi AI rtk init -g --agent pi # Pi rtk init --agent omp # Oh My Pi (OMP) rtk init --agent hermes # Hermes rtk init -g --agent droid # Factory Droid rtk init --agent trae # Trae (project: .trae/hooks.json) rtk init -g --agent trae # Trae global: ~/.trae and existing ~/.trae-cn
```bash
rtk optimizes command output before your agent reads it. The rtk-proxy daemon extends the same engine to your agent's provider-API traffic — a local background process that sits between your agent and the provider and runs the pipeline on the traffic itself: it compresses payloads, strips bytes no model ever needed before forwarding, and carries the calls your pipeline routes to cheaper models, so they borrow the credential your agent already sends and show up in rtk gain. It can also align prompt-cache breakpoints where the agent leaves them open (opt-in).
rtk claude # start the daemon if needed, then launch Claude through it
rtk llm-proxy status # is it up
rtk gain # savings, command-filtering and proxy side by side
Two independent ways in, because not every harness has a session hook:
| What it does | |
|---|---|
rtk init -g | Offers to set it up once: writes the base URL and the rtk:proxy pipeline, then asks how the daemon should come back after a reboot — SessionStart hook, background service, or neither. |
rtk <harness> | No configuration at all. Starts the daemon, points the harness at it, then execs it. Needs no hook system, which is why it covers harnesses that have none. |
rtk <harness> resolving is itself the signal that traffic really goes through the daemon — the subcommand exists only where redirection is verified. Today that is rtk claude. A harness without one is never silently unproxied: it falls through to plain passthrough, and rtk llm-proxy setup lists what can be launched.
It is a separate binary under a separate licence (BUSL-1.1), shipped as its own rtk-proxy-<target> archive — rtk never links it.
Setup and subcommands: RTK Proxy · what it compresses: What the Proxy Compresses · settings and endpoints: Proxy Configuration
[pipeline] extends = ["rtk:posthook", "rtk:proxy"] ```
The tour: Pipelines · the reference: Writing a Pipeline, Conditions and Judges, Methods, Tasks and Upstreams · the commands: Pipeline Commands · write your own method: Plugins
Everything RTK does — which commands get rewritten, what happens to a tool's output, what the proxy compresses — is expressed in one composable file. The engine (engine/, crate rtk-engine, BUSL-1.1) reads it, so the levers are configurable instead of hard-coded.
Upgrading changes nothing. With no pipeline file you are on rtk:default: the same PreToolUse rewrite, the same awareness file, your filters.toml, your config.toml. Everything beyond that is opt-in, one line at a time:
```toml
高价值的开发效率工具,通过智能代理机制显著降低LLM成本,Rust实现确保性能稳定,活跃维护和高Star数证明市场认可度强。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ Apache 2.0 — 宽松开源协议,可商用,需保留版权声明和 NOTICE 文件,含专利授权条款。
经综合评估,RTK开发CLI代理 在Agent工作流赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | rtk |
| 原始描述 | 开源AI工作流:CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. S。⭐49.1k · Rust |
| Topics | CLI代理令牌优化AI编码成本控制Rust开发 |
| GitHub | https://github.com/rtk-ai/rtk |
| License | Apache-2.0 |
| 语言 | Rust |
收录时间:2026-05-17 · 更新时间:2026-05-19 · License:Apache-2.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端