ppgranger/token-saver
136 stars · Last commit 2026-08-10
Content-aware output compression for AI coding assistants. 36 specialized processors cut CLI output tokens by 60-99% (git, pytest, npm, terraform, kubectl, docker, and more) without losing errors, diffs, or stack traces.
README preview
# Token-Saver [](https://github.com/ppgranger/token-saver/actions/workflows/ci.yml) [](tests/) [](https://python.org) [](LICENSE) [](docs/processors/) **Cut your AI coding costs by 60-99% on CLI output — without losing a single error message.** Token-Saver is a drop-in **context-window optimizer for AI coding assistants**. It compresses the verbose terminal output your agent reads — `git diff`, `pytest`, `npm install`, `terraform plan`, `kubectl`, `docker` — so you spend fewer tokens, stay under your LLM context limit, and get faster, cheaper, more focused responses. **36 specialized processors** understand the tools you already use — git, pytest, jest, cargo, go, docker, kubernetes, terraform, pulumi, helm, ansible, aws, gcloud, and more. Each one knows exactly what to keep and what to discard: errors, diffs, stack traces, and actionable data stay; progress bars, passing tests, download spinners, and boilerplate go. Compatible with **Claude Code** and **Antigravity CLI**. ~60ms of added overhead per wrapped command (regex/parsing only — dwarfed by the seconds most CLI commands take to run). No extra LLM calls. Fully deterministic. One install, instant savings. **Why developers use Token-Saver:** - 💸 **Lower API bills** — pay for signal, not noise. Typical savings of 60-99% per command. - 🪟 **Bigger effective context** — fit more real work into the same context window.