token-saver
Content-aware output compression for AI coding assistants. 36 specialized processors cut CLI output tokens by 60-99% (git, pytest, npm, terraform, kubectl, dock
What is token-saver?
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.
Overview of token-saver
What it is
Token-Saver is a content-aware output compression tool for AI coding assistants. It compresses terminal output from commands such as git diff, pytest, npm install, terraform plan, kubectl, and docker before the output reaches the AI model. Compression runs locally using 36 specialized processors, without additional model calls or uploading output. It is available for Claude Code, Antigravity CLI, and Codex (with an explicit wrapper). The project is licensed under Apache-2.0 and is open source.
Key features
- 36 specialized processors cover git, pytest, jest, cargo, go, docker, kubernetes, terraform, pulumi, helm, ansible, aws, gcloud, and more.
- Compression reduces estimated output tokens by 60-99% in many benchmark scenarios (exact savings depend on command and output).
- Delta (experimental in v3.0.0) compares consecutive pytest and Ruff runs, showing which failures are new, changed, or unchanged.
- Failure fixtures and optional quality contracts check that important diagnostics are preserved.
- Local compression uses pure regex and parsing with no network calls in the compression path.
Use cases
- Developers paying per token on Claude Code, where tool output is often the largest category of input tokens.
- Teams running agents in CI, piping long pipeline commands (terraform plan, pytest, gradle build) into a model.
- Anyone hitting context limits mid-task after large npm install or wide git diff output.
- Monorepo and infrastructure work where a single terraform plan or kubectl describe produces thousands of tokens of mostly-unchanged resource attributes.
- Privacy-sensitive environments that cannot route output through a second model or hosted service.
Getting started
/plugin marketplace add ppgranger/token-saver /plugin install token-saver After installation, run: bash token-saver stats To see it work before installing: bash git clone https://github.com/ppgranger/token-saver.git && cd token-saver python3 bin/token-saver benchmark 'git log --oneline -50' python3 bin/token-saver benchmark 'git diff' --show-removed python3 bin/token-saver explain 'docker compose logs | grep error'
License and pricing
The project is licensed under Apache-2.0 and is open source. No pricing information is stated beyond the open source license.
Based on the project's public README and repository metadata.