Tokenadevslean-ctx

Best alternative to lean-ctx

Tokenade is the best alternative to lean-ctx — Universal token-optimization engine for AI coding agents — native hooks for 18 agents combine output filtering, semantic code search, skeleton compression, sandboxed execution, MCP proxying and a live savings dashboard in a single dependency-free binary.

Get Tokenade
Tokenadelean-ctx

Output Filtering

Format-aware compactors cover git, cargo, kubectl, terraform, docker and more — 60–99% reduction on the noisiest commands. Command rewriting further trims source-side before the shell even runs.

Not available

Semantic Code Search

Finds the most relevant files for a task and sends only those to the model, instead of the whole repo. Runs fully on-device with no external vector database and no model downloads — fast even on large codebases.

Not available

Skeleton Compression

Signatures-only view of source files, YAML, Markdown and Terraform — −64% on file reads while preserving every top-level declaration. Stacks on top of output filtering for maximum savings.

Not available

Third-Party MCP Optimization

tokenade mcp-proxy wraps any third-party MCP server's launch command in the agent's MCP config, so every tool result (verbose JSON, logs, console output) is folded on the way back — set once, not per call. Image results pass through untouched.

Not available

Mechanism Breadth

The only tool combining output filtering + semantic search + skeleton compression + sandbox execution + MCP proxying + secret redaction + content-addressed cache in a single binary. On the open THOL benchmark it is the only one of the twelve tools tested that measurably cuts costs: 23% cheaper than running no tool at all, and 39% cheaper on long sessions.

Not available

Setup & Installation

npm install -g @tokenade/cli then tokenade install — native hooks auto-detected for 18 agents (Claude Code, Cursor, Codex, Gemini CLI, Copilot, Windsurf and more). Works without an account: 10M tokens offered per machine to try. Not yet on crates.io or Homebrew.

Not available

Savings Dashboard

tokenade dashboard shows measured savings, per-command and per-project breakdown, and framework-detection status. Local logs rotate automatically with built-in secret redaction.

Not available

Pricing

Freemium: works without an account (10M tokens offered per machine to try); a free account raises that to 10M tokens saved per month on unlimited machines. Pro at $24.90/mo excl. tax (19,90 € incl. tax) covers 100M/month, then optional pay-as-you-save at $0.30 excl. tax (0,20 € incl. tax) per extra million saved. Enterprise on quote ([email protected]).

Not available

lean-ctx at a glance

lean-ctx starts at Free for local use, paid cloud options. The widest feature surface of the open-source context tools: a read cache that makes repeat reads near-free, several read modes giving map and signature-level compression, shell-output compression patterns, a ranked retrieval index, and an optional local proxy that also compresses conversation history.

Pros

  • The only open-source tool here combining caching, compression, retrieval and a repository map in one binary
  • The read cache makes repeated reads cost a fraction of a fresh read, which compounds over long sessions
  • Proxy mode reaches conversation history and the system prompt — a surface hook-only tools cannot touch
  • Local-first and model-agnostic, with portable context bundles that survive a provider change

Cons

  • No measurable saving on the open THOL benchmark — it measured more expensive than running no tool at all, though not significantly so
  • It exposes a very large set of MCP tools, so the tool definitions themselves carry a fixed per-session cost that has to be earned back
  • The project states the return is low on small repositories and light shell usage
  • Wide feature surface means real configuration burden compared with a drop-in compressor

Ready to cut costs with Tokenade?

Join the teams that already chose Tokenade over lean-ctx.

Get Tokenade

Other comparisons