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
Local-first context tooling
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.
$ 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
A smaller loop, not another layer
LeanToken works at the edges of your coding workflow. It doesn't sit between your agent and its model.
Full output stays close. When pruning runs, the original command output is best-effort spooled to your local .lean/logs/ folder.
Small tools. Clear jobs.
Independent CLI features you can use together or one at a time.
01 / OUTPUT
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
Get a compact outline of classes, functions, and methods without dumping the whole file into your working context.
lean symbols src/
03 / LEARNING
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
Review pruning totals and engine latency from local telemetry. No account or hosted dashboard required.
lean stats
LOCAL BY DESIGN
LeanToken runs on your machine, works with local command output, and doesn't proxy or rewrite model conversations.
Language-friendly, not language-bound
Command pruning is language-agnostic. Symbol outlines include common source languages, with a generic summary for other files.
See usage detailsBest-effort, lightweight outlines — not compiler-grade parsing.
Open source · MIT · Node.js 18+
Start from a checkout. Add the CLI where it helps; keep the rest of your workflow unchanged.
git clone https://github.com/arifahmedjoy/leantoken.git
cd leantoken
npm link
lean prune git status
Browse the repository
A few quick answers
LeanToken is intentionally small. Here’s what that means in practice.
No. The CLI works locally and does not send source code, command output, or prompts to a LeanToken service.
No. Use the CLI directly or opt into the provided shell hooks. The pruning and symbol commands are not tied to one agent.
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.
Pruning best-effort saves the raw output to .lean/logs/last-command.log, so you can inspect detail when needed.