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 statusLocal-first context tooling
Set up supported coding tools, trim noisy command output, map source files, and audit real Claude Code sessions. The CLI runs locally, with no proxy or model calls.
$ lean prune npm test
Running project test suite...
✓ ALL TESTS PASSED
4 test groups completed
[LeanToken: condensed output]
↳ Full output: .lean/logs/<time>-<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 output is actually pruned, the original is best-effort saved 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 status02 / STRUCTURE
Get lightweight source signatures or Markdown section maps with line ranges, so you can read only the parts you need.
lean symbols src/03 / LEARNING
Analyze recent Claude Code sessions to map frequently read files and recurring command errors into local project memory.
lean learn session.jsonl04 / MEASUREMENT
See model token counts, shell output pruned or skipped, repeated reads, and the files your Claude Code sessions use most.
lean auditLOCAL BY DESIGN
LeanToken sets up local instructions for supported coding tools and, when Claude Code is detected, its output-pruning hook. It does not proxy or rewrite model conversations.
Language-friendly, not language-bound
Command pruning is language-agnostic. Symbol outlines cover 12 common source languages, Markdown section maps, and a generic summary for other files.
See usage details (opens in a new tab)Best-effort, lightweight outlines — not compiler-grade parsing.
v0.3.1 · Open source · MIT · Node.js 18+
Install LeanToken from npm, then initialize the coding tools detected for your project. Preview the changes first if you like.
npm install -g @arifahmedjoy/leantoken
cd your-project
lean init --dry-run
lean init
lean doctorBrowse the repository (opens in a new tab)View the npm package (opens in a new tab)Read the documentation (opens in a new tab)Find LeanToken on Context7 (opens in a new tab)A few quick answers
LeanToken is intentionally small. Here’s what that means in practice.
No. The CLI does not send source code, command output, or prompts to a LeanToken service. The documentation chat on this website is a separate Context7 widget, not part of the CLI.
No. LeanToken can write instructions for supported coding tools. Its automatic shell-output pruning hook is for Claude Code; you can also run the CLI commands directly.
No. It uses lightweight heuristics for supported source languages, provides section maps for Markdown, and a generic summary for other individual files. It is for quick orientation, not a replacement for a compiler or language server.
When output is actually pruned, the raw output is best-effort saved to .lean/logs/ in a per-run file. LeanToken keeps the 20 newest logs.