rtk vs token-optimizer
Rust CLI proxy compressing dev-command output 60-90% before your agent reads it — git, tests, linters, docker, 100+ commands; hooks auto-rewrite bash calls. Single binary, <10ms overhead. — versus — Context-waste hunter for coding agents: hooks compress reads, bash and search output, checkpoint before compaction, and audit waste in configs, skills, MCP and memory — with a local dashboard.
RTK is one Rust binary that compresses shell output pre-shell in <10ms and stops there. Token Optimizer reaches bash plus grep, file re-reads and compaction loss, and reports dollars — at the cost of a much larger installed surface. Pick RTK for minimal, boring and fast.
| rtk | token-optimizer | |
|---|---|---|
| Stars | 78k | 2.1k |
| Forks | 4.9k | 161 |
| Language | Rust | Python |
| License | Apache-2.0 | NOASSERTION |
| Last activity | yesterday | 2 days ago |
| Topics | coding, local | coding, skills |
| Curated connections | 4 | 6 |
rtk — the curator's take
The rare token-saver whose README explains why its headline number is NOT your bill cut — bash output is one slice of input tokens, and the savings dilute; that honesty earns trust. Two things to know before judging your gains: the hook only intercepts Bash tool calls (Claude Code's built-in Read/Grep/Glob bypass it entirely), and `rtk gain` estimates tokens at bytes/4, not with a tokenizer. Compression is lossy by design — when a debugging session goes weird, the clue may be in the output rtk collapsed; `rtk proxy` is the escape hatch, use it. Beware the crates.io name collision with Rust Type Kit.
token-optimizer — the curator's take
The one token tool that argues with the others in its own README, and mostly wins the argument. Compressors like Headroom and RTK cover command output — roughly 15-25% of your context. Token Optimizer covers eight surfaces (bash, grep, tabular, file-re-read diffs, structure skeletons, archived large results, model verbosity, structural context) and then keeps going: checkpoints before auto-compact so savings survive it, model-routing nudges, loop detection, 30-day trend coaching, and per-component audits of CLAUDE.md, skills and MCP. It is cache-safe, injects nothing into your context, and measures before/after. The costs are real too: it is a large Python/TypeScript surface with 92 env knobs and 15 SQLite tables doing hook surgery on every Read and Bash, its headline dollar figures are counterfactual models against the author's own frozen baseline, and the license is non-standard. Pick RTK if you want one boring binary; pick this if you want the whole waste budget attacked and instrumented.