Gitingest is a powerful Ruby gem that fetches repository files and generates consolidated text prompts optimized for large language models.
Why Use Gitingest
Extract the essence of any GitHub codebase with precision and transform it into the perfect context for LLM prompting.
Utilizes configurable thread counts to accelerate downloads and intelligently prioritize files for optimal concurrency.
Automatically excludes unnecessary binary and system files while supporting custom exclusion patterns to fit your needs.
Visual progress indicators display processing speed, ETA, and file counts, keeping you informed every step of the way.
Generate a tree-view of the repository structure to easily navigate and understand codebase organization.
Produces a well-organized, consolidated text prompt that’s perfect for feeding into large language models.
Integrate Gitingest seamlessly into your workflow. Whether you install via RubyGems or clone the repository, the CLI lets you extract repository content quickly and effortlessly.
# Install from RubyGems
gem install gitingest
# Clone from GitHub and install dependencies
git clone https://github.com/davidesantangelo/gitingest.git
cd gitingest
bundle install
bundle exec rake install
# Basic usage for public repositories
gitingest --repository user/repo
# Using a GitHub token for private repositories
gitingest --repository user/repo --token YOUR_GITHUB_TOKEN
# Generate repository prompt and show structure
gitingest --repository user/repo --show-structure
Improved default branch handling and enhanced repository validation with better error handling.
Introduced repository directory structure visualization, added DirectoryStructureBuilder, and improved concurrent processing with thread management.
--show-structure
optionDirectoryStructureBuilder
classImplemented in-memory prompt generation, visual progress bar, and enhanced multithreaded operations.
generate_prompt
methodOptimized threading with configurable options and introduced exponential backoff for API requests.