lixueduan.com

Token Killer: RTK,给你的 AI 编程代理瘦个身 (opens in new tab)

RTK (Rust Token Killer) 是一个 CLI 代理工具,它的核心思路是在命令输出到达 AI 之前把噪音过滤压缩掉,从而实现平均省 60-90% 的 token 的效果。 你有没有算过,Claude Code 一个小时的会话,光 git status、cargo test 这些命令的输出就吃掉多少 token? 原因在于大多数 CLI 命令的输出是给人看的——带进度条、带彩色、带提示语、带格式化。但对 AI 来说,git push 输出的 15 行 “Enumerating objects…” 毫无意义,它只需要知道 “ok main”。 快速上手 安装 1 2 3 4 5 # Homebrew(推荐) brew install rtk # 或脚本安装 curl -fsSL | sh 验证一下: 1 2 rtk --version # 应该显示 rtk 0.39.x rtk gain # 应该显示 token 节省统计 配置 一条命令搞定——给你的 AI 工具装上 Hook: 1 2 3 4 5 6 7 # 对于 Claude Code(默认) rtk init ...

Read the original article
Sign in to keep reading the full article.

Keyboard Shortcuts

Navigation

Next / previous post
j/k
Open post
oorEnter
Preview post
v

Post Actions

Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Save / unsave
s

Recommendations

Add interest / feed
Enter
Not interested
x

Go to

Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Discover
gb
Search
/

General

Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help