Blog / Comparison

TokenBeaver vs squeez: hook-based compression vs a measured gateway

Prashant Sharma
TokenBeaver · July 22, 2026 · 6 min read

squeez is what happens when someone takes agent-hook compression seriously: five CLI hosts, aggressive dedup, session memory, zero dependencies, free. It deserves a fair comparison — so here's one.

What squeez is, and what it does well

squeez is an open-source, hook-based token compressor for five AI CLI hosts — Claude Code, Copilot CLI, OpenCode, Gemini CLI, and Codex CLI. Its README claims up to 95% compression on bash output and 80–99% reduction on build/test logs, using cross-call dedup, signature-mode code reads, and a hook that can shrink a 10,000-line build log to a 200-line error summary before it ever enters context. It even injects a structured summary of your previous session on start.

Where the jobs differ

Hooks fire when the host lets them fire. That gives squeez real leverage over tool output — and no visibility into anything else, or into what any of it costs you.

A compressor makes context smaller. A gateway makes the spend answer to you.

Pick honestly

Pick squeez if you live in supported CLI hosts, want maximum compression for free, and don't need the savings measured or proven.

Pick TokenBeaver if you want the same class of savings with a meter on it — free forever to start, one install, and a Pro tier that has to earn its keep, by policy. For the Claude-specific squeeze, see cutting Claude Code costs.

Compression is a feature. Proof is the product.

Free forever — no login, no card. CLI from npm or the VS Code extension, same local gateway either way.

Download free → See pricing