DEV Community

Valancio Dsouza
Valancio Dsouza

Posted on

Did you guys know about this tool "S.A.G.E - CLI" that saved me $45 in AI tokens by compressing terminal output 93% in just 3 days of using it.

I've been using AI coding assistants (Claude, Codex, etc.) and kept hitting token limits because terminal output is SUPER noisy. A single pytest command can eat 30,000 tokens of your context.
So I started using SAGE (Smart Agent Guidance Engine) - it sits between your terminal and AI agents, compressing output by 93% while keeping all the important stuff.
CLI install pip install psycgod-sage
sage connect (Git OAuth)
What it does:

  • Wraps your commands: sage run -- pytest
  • Compresses output in real-time (30k tokens → 2k)
  • 10+ specialized agents watch for errors, secrets, dependencies
  • ML learns your command patterns to predict failures
  • Everything stays local by default (privacy-first) Real numbers from my usage:
  • Processed: 6,613 commands
  • Saved: 15.3 million tokens (would cost ~$45 at Claude Sonnet rates)
  • Agent runs: 41,578 (caught secrets, predicted errors, etc.) Why I'm sharing: It's a open-source, free and because I figured others hit the same problem. It's MIT licensed, runs locally, and has a live dashboard showing aggregate proof (no raw data). Repo GitHub: /PsYcGoD/sage The compression alone saves tokens, but the agents catching secrets before you commit them? That's saved me a few times already. Questions welcome! Would love feedback from the community.†

Top comments (0)