What is Gitingest?
Gitingest converts any GitHub repository into a single, LLM-optimized text file. It extracts the file tree and source code, filters out binaries and generated files, and produces clean context that fits into an AI conversation — perfect for code review, migration planning, or asking an AI to understand an entire codebase.
Answer-Ready: Gitingest converts GitHub repositories into single text files optimized for LLM consumption. Extract file trees and source code from any repo, ready for Claude Code, ChatGPT, or any AI coding tool. Free web UI at gitingest.com. 8k+ GitHub stars.
Best for: Developers who need to feed entire codebases into AI tools. Works with: Any LLM (Claude, GPT, Gemini), any GitHub repo. Setup time: Zero (web UI) or 1 minute (pip install).
Core Features
1. Web UI
Visit gitingest.com:
- Paste any GitHub URL
- Click "Ingest"
- Copy the output into your AI conversation
2. Python API
from gitingest import ingest
# Basic usage
summary, tree, content = ingest("https://github.com/user/repo")
# With filters
summary, tree, content = ingest(
"https://github.com/user/repo",
include_patterns=["*.py", "*.ts"],
exclude_patterns=["tests/*", "node_modules/*"],
max_file_size=100000, # Skip files > 100KB
)3. CLI
gitingest https://github.com/user/repo > repo_context.txt
# With filters
gitingest https://github.com/user/repo \
--include "*.py" \
--exclude "tests/*" \
--output context.txt4. Smart Filtering
Automatically excludes:
- Binary files (images, compiled code)
- Lock files (package-lock.json, yarn.lock)
- Generated code (dist/, build/)
- Large files (configurable threshold)
- Hidden files (.git/, .env)
5. Output Format
Repository: user/repo
Files: 47
Total size: 125 KB
Directory Structure:
├── src/
│ ├── main.py
│ ├── utils.py
│ └── models/
│ ├── user.py
│ └── order.py
├── tests/
│ └── test_main.py
└── README.md
--- File: src/main.py ---
[full file contents]
--- File: src/utils.py ---
[full file contents]
...Use Cases
| Use Case | How |
|---|---|
| Code review | Feed repo to AI for review |
| Migration | "Convert this Flask app to FastAPI" |
| Documentation | "Generate docs for this codebase" |
| Learning | "Explain this project's architecture" |
| Bug hunting | "Find potential bugs in this code" |
FAQ
Q: Is the web UI free? A: Yes, gitingest.com is free with no sign-up required.
Q: Does it work with private repos? A: The Python library works with any git URL you have access to. The web UI requires public repos.
Q: How does it handle large repos? A: Smart filtering reduces context size. You can also use include/exclude patterns to focus on specific directories.