Turn any Git repository into a prompt-friendly text ingest for LLMs.
You can also replace hub with ingest in any GitHub URL to access the coresponding digest
gitingest.com Β· Chrome Extension Β· Firefox Add-on
- Easy code context: Get a text digest from a git repository URL or a directory
 - Smart Formatting: Optimized output format for LLM prompts
 - Statistics about: 
- File and directory structure
 - Size of the extract
 - Token count
 
 - CLI tool: Run it as a shell command (currently on Linux only)
 - Python package: Import it in your code
 
pip install gitingestThe extension is open source at lcandy2/gitingest-extension. Issues and feature requests are welcome to the repo.
The gitingest command line tool allows you to analyze codebases and create a text dump of their contents.
# Basic usage gitingest /path/to/directory # From URL gitingest https://github.com/cyclotruc/gitingest # See more options gitingest --helpThis will write the digest in a text file (default digest.txt) in your current working directory.
from gitingest import ingest summary, tree, content = ingest("path/to/directory") # or from URL summary, tree, content = ingest("https://github.com/cyclotruc/gitingest")By default, this won't write a file but can be enabled with the output argument
-  
Build the image:
docker build -t gitingest . -  
Run the container:
docker run -d --name gitingest -p 8000:8000 gitingest
 
The application will be available at http://localhost:8000
If you are hosting it on a domain, you can specify the allowed hostnames via env variable ALLOWED_HOSTS.
#Default: "gitingest.com,*.gitingest.com,localhost, 127.0.0.1". ALLOWED_HOSTS="example.com, localhost, 127.0.0.1"- Tailwind CSS - Frontend
 - FastAPI - Backend framework
 - Jinja2 - HTML templating
 - tiktoken - Token estimation
 - apianalytics.dev - Simple Analytics
 
Check out the NPM alternative π¦ Repomix: https://github.com/yamadashy/repomix
Gitingest aims to be friendly for first time contributors, with a simple python and html codebase. If you need any help while working with the code, reach out to us on discord
- Provide your feedback and ideas on Discord
 - Open an issue on GitHub to report a bug / submit a feature request
 - Talk about Gitingest on social media
 
- Fork the repository & clone it locally
 - Setup the dev environment (see Development section bellow)
 - Run unit tests with 
pytest - Commit your changes and run 
pre-commit - Open a pull request on Github for review and feedback
 - (Optionnal) Invite project maintainer to your branch for easier collaboration
 
-  
Clone the repository:
git clone https://github.com/cyclotruc/gitingest.git cd gitingest -  
Install dependencies:
pip install -r requirements-dev.txt python -m venv .venv source .venv/bin/activate pre-commit install -  
Run the application:
cd src uvicorn main:app --reload -  
Run unit tests:
pytest
 
The application should be available at http://localhost:8000
-  
Install the package in dev mode:
pip install -e . -  
Run the CLI:
gitingest --help
 
