Documentation

Quick Reference

Daily workflow cheat sheet for lean-ctx.

Your cheat sheet for daily use. For detailed explanations, follow the links to each section's dedicated page.


Read Mode Decision Tree

Which ctx_read mode should the AI use?

SituationModeTypical savings
File you'll edit full Re-reads: ~99%
Context only (deps, structure) map ~93%
API surface (fn/class signatures) signatures ~95%
After editing a file diff ~98%
Browse a large file aggressive ~85%
Very large file, few relevant lines entropy ~90%
Task-relevant lines only task ~77%
API docs and reference lookup reference ~80-95%
Specific line range (surgical) lines:N-M ~90-99%
Automatic (default - best mode per file) auto ~70-99%

Full ctx_read documentation →


Context Tools (what the AI uses)

These are called by the AI automatically - you don't type them.

ToolPurposeSavings
ctx_read Read file with compression + caching up to 99%
ctx_shell Execute command with output compression 60–95%
ctx_search Code search with compact results 50–80%
ctx_session Cross-chat session memory 99% cold-start
ctx_graph Dependency graph visualization -
ctx_smells Code smell detection with graph scoring -

Full tools reference →


CLI Commands (what you type)

Essential

CommandWhat it does
lean-ctx setupOne-time setup - detects shell + AI tools, installs everything
lean-ctx gainSavings dashboard (--live, --graph, --daily)
lean-ctx doctorDiagnose installation issues (11 checks)
lean-ctx dashboardWeb dashboard with charts (localhost:3333)
lean-ctx knowledge <action>Project knowledge: remember, recall, search, export, import, remove, status, health
lean-ctx benchmark run [path]Real token savings measurement

Full CLI reference →