What problem does it solve?
Reading large files and verbose command output can waste tokens, slow down AI workflows, and bury the truly relevant code paths.
Core Features & Use Cases
- Context-compressed shell execution: run common dev/ops commands through lean-ctx to reduce noisy output while keeping what matters (e.g., git status/diff/log, build/test output, kubectl/helm/terraform summaries).
- Multiple read modes for files: pull full content or structured subsets like dependency maps, exported signatures, syntax-stripped views, entropy-filtered snippets, or diffs since the last read.
- Code-aware parsing and relevance: uses tree-sitter AST parsing across many languages and applies task-conditioned relevance scoring to focus the context.
- Session continuity (CCP): maintains cross-chat/task continuity with stored “knowledge”, session state, and recall/search to avoid rework across iterations.
Quick Start
Run lean-ctx using its one-command install and setup, then use it to read a large code file in signatures mode for an API-surface-first context.