For builders

Your AI coding agent,
minus the token bill.

LeanCTX is the local binary that makes your coding agent read less and remember more: 60–90% fewer tokens, re-reads that cost about 13 tokens, and project memory that survives restarts. Free forever, no account, runs on your machine.

The cost

What burns your token budget.

On a personal project, every wasted token is your money. Three quiet leaks add up fast.

Re-reading the same files

Each turn, your agent reads files it saw a minute ago — and you pay full price for that context again.

Long sessions drift

As the context window fills, agents quietly drop what they read and answers get worse without warning (Claude Code #42542).

The bill scales with ambition

The more you build, the more raw output, search results and file reads flood the window, and the bigger your monthly bill.

How it works

How it makes your agent lean.

One small Rust binary runs the same loop on every read, command and search, locally, with no change to your editor.

01

It sits between agent and files

Every read, search and shell command your AI runs passes through lean-ctx first, on your machine. Your editor, agent and workflow stay exactly the same.

02

It returns structure, not noise

tree-sitter parses the file across 26 languages and returns a map or signatures, the shape the model actually needs. Ten read modes pick the right depth per task.

03

The second read is free

Every read is cached by content hash, so an unchanged file comes back in about 13 tokens instead of thousands.

04

It remembers your project

Findings, decisions and touched files are saved and auto-restored into your next session, so you never re-explain context after a restart.

See it run

From install to proof in five commands.

No config files, no account. Install it, point your tools at it, and watch the tokens drop.

# Install: one Rust binary, no account
$ curl -fsSL https://leanctx.com/install.sh | sh
# Add the shell hook, then connect every AI tool you use
$ lean-ctx init && lean-ctx setup
→ detected Cursor, Claude Code, Copilot, Codex … configured
# Your agent reads a file: the whole file comes back as a map
$ lean-ctx read src/server.ts
→ 4,200 → 920 tokens · 78% saved
# It reads the same file again: already cached
$ lean-ctx read src/server.ts
→ cache hit · ~13 tokens
# Prove the savings on your own repo, signed in a ledger
$ lean-ctx benchmark report .
What you get

What changes for you.

Four outcomes you feel from the first session: measured, local, and free.

60–90% fewer tokens

Per read, every read, measured on your own repo with lean-ctx benchmark, not estimated.

Sessions that stay sharp

The window fills with signal, so long sessions stop drifting and silently degrading mid-task.

Nothing leaves your machine

One local binary. Your code and prompts never reach a third-party service.

Free forever

Every local feature ships under Apache-2.0: open, inspectable, and yours to keep.

Every local feature is free forever, enforced by a public CI gate. Building with others? See LeanCTX for teams or compare the plans.

FAQ

Builders, answered.

Is it really free?

Yes. Every local feature is Apache-2.0 and free forever, and a public CI gate fails the build if any local capability moves behind a paywall. Paid plans only add optional cloud sync.

Do I need an account?

No. LeanCTX runs entirely on your machine: no signup, no API key, and no telemetry unless you turn it on.

Will compression hurt my code?

No. tree-sitter parses structure before anything is dropped, and compressed output is only used when a composite quality score stays at or above 95% (AST, identifier and line preservation). Run lean-ctx benchmark report . to verify on your own repo.

Which tools does it work with?

Anything that speaks MCP (Model Context Protocol), 30+ today, plus a shell hook for the rest. One lean-ctx setup detects and configures them.

Five minutes to a leaner agent.

One Rust binary. No cloud, no account, Apache-2.0. Your next session reads leaner, and the ledger keeps the receipt.