gitingest.com - 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
- One-Click Analysis: Simply paste a Git repository URL and get instant pastable context
- Smart Formatting: Optimized output format for LLM prompts
- Statistics about: :
- File and directory structure
- Size of the extract
- (soon) Token count
 
- Web Interface: Lightweight responsive UI
- Tailwind CSS
- FastAPI - Backend framework
- apianalytics.dev - Usage tracking
To run the tests, first install the test dependencies:
pip install -r requirements.txtThen run the tests with coverage:
cd src
pytest --covTo generate a coverage HTML report:
pytest --cov --cov-report=htmlThe report will be available in htmlcov/index.html
- Clone the repository:
git clone https://github.com/cyclotruc/gitingest.git
cd gitingest- Install dependencies:
pip install -r requirements.txt- Run the application:
cd src
uvicorn main:app --reloadThe application will be available at http://localhost:8000
- 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
You can configure the application using the following environment variables:
- ALLOWED_HOSTS: Specify allowed hostnames for the application. Default:- "gitingest.com,*.gitingest.com,gitdigest.dev,localhost".
Example:
ALLOWED_HOSTS="gitingest.local,localhost"Ensure these variables are set before running the application or deploying it via Docker.
Create a pull request or open an Issue about anything you'd like to see in gitingest
- Feedback/suggestions: Please open a github Issue or mail me: romain@coderamp.io
- Repository cloning is limited to public GitHub repositories only
- Too big repos will probably timeout (if longer than 20 secondes to clone)
pip install -e .The gitingest command line tool allows you to analyze any directory and create a text dump of its contents.
gitingest /path/to/directoryThis will create a text file named after your directory (e.g., directory.txt) in your current working directory.
gitingest /path/to/directory -o /path/to/output.txt- -o, --output: Specify the output file path (default:- <directory_name>.txtin current directory)
- -s, --max-size: Maximum file size to process in bytes (default: 10MB)
- -i, --ignore-pattern: Additional patterns to ignore (can be used multiple times)
# Basic usage
gitingest ~/projects/myproject
# Custom output location
gitingest ~/projects/myproject -o ~/Desktop/analysis.txt
# Ignore specific file patterns
gitingest ~/projects/myproject -i "*.csv" -i "*.json"
# Set maximum file size (e.g., 5MB)
gitingest ~/projects/myproject -s 5000000The generated text file contains:
- Summary statistics (file count, directory count, content size)
- Directory tree structure
- Contents of all text files
Files and directories that are commonly ignored (like .git, node_modules, cache directories, etc.) are automatically excluded. You can add additional patterns to ignore using the -i flag.
