edouard-claude/snip

CLI proxy that reduces LLM token usage by 60-90%. Declarative YAML filters for Claude Code, Cursor, Copilot, Gemini. rtk alternative in Go.

What it solves

AI coding agents often waste significant token counts on verbose shell output that contains no useful signal, such as long test logs or extensive metadata. This increases costs and consumes the LLM's context window unnecessarily.

How it works

Snip acts as a CLI proxy that sits between an AI coding assistant and the shell. It intercepts command output and processes it through declarative YAML pipelines. These pipelines can match specific commands (like go test or git log) and apply actions like keeping specific lines, truncating text, or extracting JSON fields to return a condensed, high-signal version of the output to the LLM.

Who it’s for

Developers using AI coding assistants such as Claude Code, Cursor, GitHub Copilot, Windsurf, Aider, and Gemini CLI who want to optimize token usage and context window efficiency.

Highlights

  • Universal Compatibility: Integrates with major tools via native hooks or prompt injection.
  • Declarative Filtering: Uses YAML files to define complex transformation pipelines (regex, truncation, template formatting).
  • High Performance: Designed for sub-10ms startup latency to ensure no perceptible delay in command execution.
  • Extensive Built-ins: Includes 132 pre-configured filters for popular tools like Git, Docker, Go, Rust, Python, and npm.
  • Token Savings Tracking: Provides a dashboard to monitor commands run and tokens saved.