Context Builder igorls
winget install --id=igorls.context-builder -e Context Builder is a command-line tool designed to automate the creation of a structured, LLM-optimized markdown file from any codebase directory. It streamlines the process of preparing code for AI consumption by generating clean, relevant context with minimal effort.
Key Features:
- Relevance-Based File Ordering: Organizes files to prioritize config, project docs, source code (entry points first), tests, documentation, and lockfiles last for optimal LLM understanding.
- AST-Aware Code Signatures: Utilizes Tree-Sitter to extract function/class signatures and structural summaries, enhancing context clarity.
- Token Budgeting: Automatically caps output size with adjustable limits to prevent exceeding model context windows.
- Parallel Processing: Leverages multiple CPU cores to process thousands of files efficiently.
- Configuration Support: Allows customization via a
context-builder.tomlfile for consistent outputs across projects. - Diff Tracking: Generates diffs between snapshots to highlight changes, reducing redundant content and token usage.
Audience & Benefit: Ideal for developers, data scientists, and AI engineers who need to provide context to LLMs. Context Builder saves time by automating the creation of structured, optimized documentation, ensuring AI models receive high-quality inputs tailored for accurate responses.
Available via winget for easy installation, Context Builder is a powerful tool for anyone working with codebases and large language models.
