Project

gitingest

0.02
The project is in a healthy, maintained state
Gitingest is a powerful command-line tool that fetches files from GitHub repositories and generates consolidated text prompts for AI analysis. It features smart file filtering, concurrent processing, custom exclusion patterns, authentication support, and automatic rate limit handling. Perfect for creating context-rich prompts from codebases for AI assistants, documentation generation, or codebase analysis.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 2.0
~> 13.0
~> 3.0

Runtime

 Project Readme

Gem Version

Gitingest

Turn any GitHub repo into an LLM-ready prompt.

Install

gem install gitingest

Usage

# Basic
gitingest -r user/repo

# With token (for private repos)
gitingest -r user/repo -t YOUR_TOKEN

# Custom output
gitingest -r user/repo -o prompt.txt

# Show repo structure
gitingest -r user/repo -s

As a Library

require "gitingest"

generator = Gitingest::Generator.new(
  repository: "user/repo",
  token: "YOUR_TOKEN"  # optional
)

# Write to file
generator.run

# Or get content as string
content = generator.generate_prompt

Options

Flag Description
-r, --repository GitHub repo (user/repo)
-t, --token GitHub token
-o, --output Output file
-b, --branch Branch name
-e, --exclude Patterns to exclude
-s, --show-structure Show directory tree
-T, --threads Thread count
-q, --quiet Quiet mode
-v, --verbose Verbose mode

Limits

  • Max 1000 files per repo
  • 60 req/hour without token, 5000 with token
  • Private repos require a token

License

MIT

Credits

Inspired by cyclotruc/gitingest.