ARC Web

Diet Claude
Rust

Hybrid Context Optimizer β€” Shell Hook + MCP Server. Reduces LLM token consumption by 89-99%. Single Rust binary, zero dependencies.
RustOpen Source
The problem

What's broken without this

😀
Context window fills instantly
Large codebases and verbose CLI output consume your LLM context budget before you finish describing the problem.
πŸ’Έ
Token costs spiral out of control
Each file read, test output, and dependency tree dump multiplies your API bills and slows down iterative development.
πŸ”
Repetitive context re-submission
You manually trim, summarize, and re-paste the same project structure and logs across multiple LLM conversations.
The difference

Why it matters

βœ— Without
Manual work
Slow iteration
Repeated mistakes
βœ“ With this
Runs as single Rust binary with zero external dependenciesβ€”no Node, Python, or Docker overhead
Dual-mode operation: transparent shell hook for any CLI tool, plus 10 MCP tools for explicit editor integration
Achieves 89–99% token reduction on real workloads without requiring LLM-side prompting or model changes
Under the hood

How it works

πŸ“₯
Capture CLI output or file reads
Shell hook intercepts command output; MCP server handles explicit file/dependency requests from your editor.
βš™οΈ
Parse with tree-sitter AST
Extracts semantic structure from 14 languages, strips whitespace and comments, encodes via Token Dense Dialect (TDD) to compress syntax trees by 70–90%.
πŸ“€
Send compressed context to LLM
Editor receives dense, structured output that preserves code meaning in 1–11% of original tokens.
What it does

Core capabilities

⚑
Fast
Optimized for speed and efficiency.
🎯
Reliable
Built to work consistently.
πŸ”Œ
Integrates
Works with your existing tools.
I stopped manually copying file trees into Claude because lean-ctx compresses my entire project structure into a few hundred tokensβ€”and my editor sees it automatically.
arc-web/diet-claude
Codebase

Built with care

πŸ’»
Rust
Built in Rust for type safety and reliability.
πŸ—οΈ
Architecture
MCP Server
πŸ“¦
Key deps
rmcp, tiktoken-rs, tokio
πŸ”“
Open Source (MIT / PolyForm)
Fork it, extend it, ship it. It's yours.
Built by

Mike Ensor
Arc Web

AI automation, marketing technology, building tools that work.
Mike builds open-source AI tools for agencies, marketers, and operators who are done waiting for software to catch up. All Arc Web projects are open source by default β€” fork them, extend them, ship them.
1 / 8
\u2190 \u2192 arrow keys  |  P to play  |  M to mute