Discover and explore top open-source AI tools and projects—updated daily.
edouard-claudeAI token optimizer for shell commands
Top 95.1% on SourcePulse
Summary
This project addresses the significant cost of LLM token usage by filtering verbose shell output before it reaches AI coding assistants. Targeting developers and power users of tools like Claude Code, Cursor, and Copilot, snip acts as a CLI proxy to reduce token consumption by 60-90%, providing only essential signal to the AI for improved efficiency and cost savings.
How It Works
snip employs a unique "filters are data, not code" philosophy. It intercepts shell commands, processes their output through declarative YAML filter pipelines, and forwards only the condensed, relevant information to the AI. This Go-based engine allows filters to evolve independently of the core binary, fostering rapid extensibility. Unlike solutions requiring code recompilation for filter updates, snip enables users to write or modify filters in YAML, significantly lowering the barrier to contribution and customization. Key design principles include sub-10ms startup latency, graceful degradation to raw output on filter failure, exit code preservation, and zero CGO dependencies for static binaries and easy cross-compilation.
Quick Start & Requirements
curl -fsSL https://raw.githubusercontent.com/edouard-claude/snip/master/install.sh | shbrew install edouard-claude/tap/snipgo install github.com/edouard-claude/snip/cmd/snip@latestgit clone https://github.com/edouard-claude/snip.git && cd snip && make installsnip init command.install.sh), Homebrew tap (edouard-claude/tap), GitHub Releases for binaries.Highlighted Details
keep_lines, regex_extract, json_extract) for flexible filtering logic.Maintenance & Community
The README does not detail specific contributors, sponsorships, or community channels (e.g., Discord, Slack). The project is inspired by rtk (Rust Token Killer) by the rtk-ai team.
Licensing & Compatibility
Limitations & Caveats
Installation scripts are primarily targeted at macOS and Linux; Windows users may need to rely on manual binary downloads or building from source. Building from source requires Go version 1.25 or later. While designed for minimal overhead, complex filter pipelines could introduce processing time, though the project emphasizes sub-10ms startup latency.
14 hours ago
Inactive
QwenLM
rtk-ai