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 assistants often waste significant amounts of tokens on verbose shell output (such as long test logs or detailed git metadata) that provides little value to the model. snip reduces this noise by filtering shell output before it reaches the AI's context window, potentially reducing token usage by 60-90%.

How it works

snip acts as a CLI proxy between the AI tool and the system shell. It uses declarative YAML pipelines to match specific commands and transform their output. For example, it can rewrite a go test command to use JSON output and then condense the result into a single summary line (e.g., "1125 passed, 0 failed"). If no filter matches a command, it passes through unchanged.

Who it’s for

Developers using AI coding agents like Claude Code, Cursor, Copilot, Gemini CLI, Windsurf, Cline, and Aider who want to lower their token costs and prevent the context window from being cluttered with irrelevant logs.

Highlights

  • Broad Integration: Supports a wide array of AI tools via native hooks (Claude Code, Cursor, Copilot, Codex) or prompt injection (Gemini, Windsurf, Cline).
  • Extensive Built-in Library: Ships with 132 YAML filters covering major tools like Git, Go, Rust, Python, JS/TS, Docker, and Kubernetes.
  • Declarative Configuration: Filters are defined as YAML data files rather than compiled code, making them easy to create and extend.
  • Token Tracking: Includes a built-in dashboard (snip gain) to track and report token savings using an SQLite database.
  • Customizable Pipelines: Offers 20 different pipeline actions (e.g., keep_lines, json_extract, aggregate) to precisely control how output is condensed.

Related

  • Project
  • Project
  • Project
  • Project
  • Project