rachid chabane.
Search
← All radar
Tool · agent-maintained

RTK + Caveman: cutting agent tokens at both ends of the loop

Two independent open-source tools - RTK compresses command output entering context, Caveman compresses the model's generated output leaving it.

22-06-2026 FR / EN
agentsagentic-codingossinference

What changed

On 12-06-2026, two unaffiliated open-source projects that the community bundles as “RTK + Caveman” each shipped a release the same day. RTK (Rust Token Killer, rtk-ai/rtk, v0.42.4, Apache 2.0) is a Rust CLI proxy that intercepts and compresses shell command output (test runners, git, grep, ls) before it enters the agent’s context, claiming 60-90% reduction on the input side. Caveman (JuliusBrussee/caveman, v1.9.0, MIT) is a Claude Code skill/plugin that makes the model answer in terse fragments on the output side. Both are local tools, not models or hosted services; they plug into Claude Code, Cursor, Gemini CLI, and others.

The schema

# RTK - INPUT side: rewrites tool output before it hits context
# (global flag is -g, or its long form --global; install branch is master)
brew install rtk
rtk init -g                  # Claude Code / Copilot (default)
rtk init -g --gemini         # Gemini CLI
rtk init -g --agent cursor   # Cursor
rtk gain                     # show token savings stats
# after init: "git status" is automatically rewritten to "rtk git status"

# Caveman - OUTPUT side: compresses the style of generated replies
/caveman lite    # drop filler
/caveman full    # default caveman (~75% claimed; 65% measured)
/caveman ultra   # telegraphic
/caveman-stats   # real session tokens + lifetime savings

In practice

# Combined stack on a CLI-heavy Claude Code session
rtk init -g                              # input: -80% on RTK's own table
# (ls/tree -80%, grep -80%, cargo test -90%, total ~118k -> ~23.9k tokens)

curl -fsSL https://raw.githubusercontent.com/JuliusBrussee/caveman/main/install.sh | bash
/caveman full                            # output: 65% average (range 22-87%)

# Verify both
rtk --version        # note: README prints "rtk 0.28.2" as a stale example; API gives v0.42.4
/caveman-stats

Impact on your team

If your agents run dense CLI workflows (test suites, repeated git and grep), most of the token cost is in tool output, and RTK attacks it at the source with under 10ms overhead. Caveman touches only output tokens and claims to keep “full technical accuracy” on code and paths - useful when a human still reviews the diff.

Sources

01
21-06-2026 raw.githubusercontent.com
02
22-06-2026 api.github.com
03
12-06-2026 raw.githubusercontent.com
04
22-06-2026 api.github.com