Discover and explore top open-source AI tools and projects—updated daily.
CLI tool for LLM code context
Top 98.8% on SourcePulse
A CLI tool to provide LLM context for coding projects by combining project files into a single text file with a directory tree structure. It helps developers by simplifying the process of feeding relevant code context to Large Language Models (LLMs) for tasks like code completion or debugging. The tool offers flexible file selection, filtering, and configuration options, making it adaptable to various project needs.
How It Works
The tool traverses a project directory, respecting .gitignore
rules and common exclusion patterns (like .git
, __pycache__
). It allows users to include or exclude files based on simple file extensions or advanced glob patterns. The content of the selected files is then combined into a single output, optionally with a directory tree structure and line numbers. Users can interactively select files, save configurations globally (~/.gptreerc
) or per-project (.gptree_config
), and override settings via CLI arguments.
Quick Start & Requirements
pipx install gptree-cli
. Alternatives include Homebrew (brew install travisvn/tap/gptree
) or pip (pip install gptree-cli
).Highlighted Details
.py,.js
) and advanced glob pattern matching.Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
The tool's "Safe Mode" has default limits on file count and combined size, which can be disabled but may lead to very large outputs. The README does not detail specific performance benchmarks or known bugs.
1 month ago
Inactive