Local-first context tooling

Keep your coding agent's context lean.

A small CLI that trims noisy command output, maps code structure, and remembers useful project patterns. No proxy. No model calls. Just less noise between you and the work.

MIT licensed Node.js 18+ No runtime dependencies
lean — local command view ready

$ lean prune npm test

Running project test suite...

✓ ALL TESTS PASSED

4 test groups completed

[LeanToken: condensed output]

↳ Full output: .lean/logs/last-command.log

Original output kept locally 0 network calls
↘ noisy output
✳ useful signal
BUILT FOR PRACTICAL CODING WORKFLOWS 01 deterministic pruning 02 lightweight outlines 03 local project memory

A smaller loop, not another layer

Useful context in.
Less noise out.

LeanToken works at the edges of your coding workflow. It doesn't sit between your agent and its model.

THE LOCAL FLOW01 / 03
Your command git · tests · JSON · more
LeanToken deterministic local rules
Focused context agent sees the signal

Full output stays close. When pruning runs, the original command output is best-effort spooled to your local .lean/logs/ folder.

LOCAL

Small tools. Clear jobs.

Keep the useful.
Leave the rest nearby.

Independent CLI features you can use together or one at a time.

01 / OUTPUT

Prune command noise

Condense common Git, test, directory, and JSON output with predictable local rules. Unexpected parsing trouble fails open to the original output.

lean prune git status

02 / STRUCTURE

See code shape

Get a compact outline of classes, functions, and methods without dumping the whole file into your working context.

lean symbols src/

03 / LEARNING

Remember project patterns

Analyze supported JSONL transcripts out of band to surface repeatedly read files and command errors in local project memory.

lean learn session.jsonl

04 / VISIBILITY

Track local savings

Review pruning totals and engine latency from local telemetry. No account or hosted dashboard required.

lean stats

LOCAL BY DESIGN

Your workflow stays yours.

LeanToken runs on your machine, works with local command output, and doesn't proxy or rewrite model conversations.

Language-friendly, not language-bound

Work in the stack
you already have.

Command pruning is language-agnostic. Symbol outlines include common source languages, with a generic summary for other files.

See usage details
OUTLINE SUPPORT ready
JavaScriptTypeScriptPython PHPJavaC# GoRustRuby KotlinSwiftC / C++

Best-effort, lightweight outlines — not compiler-grade parsing.

Open source · MIT · Node.js 18+

Make room for
the real work.

Start from a checkout. Add the CLI where it helps; keep the rest of your workflow unchanged.

QUICK START1 minute
git clone https://github.com/arifahmedjoy/leantoken.git
cd leantoken
npm link
lean prune git status
Browse the repository

A few quick answers

Good to know.

LeanToken is intentionally small. Here’s what that means in practice.

Does LeanToken send code or prompts to a service?

No. The CLI works locally and does not send source code, command output, or prompts to a LeanToken service.

Does it require a specific coding agent?

No. Use the CLI directly or opt into the provided shell hooks. The pruning and symbol commands are not tied to one agent.

Does symbol outlining parse every language perfectly?

No. It uses lightweight heuristics for common languages and a generic summary for other individual files. It is designed for quick orientation, not as a replacement for a compiler or language server.

What happens to the full command output?

Pruning best-effort saves the raw output to .lean/logs/last-command.log, so you can inspect detail when needed.