A CLI and web tool that packs an entire code repository into one AI-friendly file for feeding to LLMs like Claude or ChatGPT.
coderamp-labs/gitingest
Turns a Git repository or local directory into a single prompt-friendly text digest for feeding code to LLMs.
- Stars
- 15,961
- Forks
- 1,192
- Open issues
- 22
- Last commit
- 2 days ago
What is it?
Gitingest converts a Git repository, a subdirectory, or a local folder into one text file that summarizes the directory tree and concatenates the contents of the files. The output is shaped for pasting into LLM prompts, so developers can give a model the context of a codebase without manually copying files. Replacing 'hub' with 'ingest' in any GitHub URL produces the digest directly.
It is available as a CLI command, a Python package with synchronous and async functions, and a web app and browser extensions. The tool reports the file and directory structure, the size of the output, and a token count. Files listed in .gitignore are skipped by default, and a GitHub personal access token can be supplied for private repositories.
For self-hosting, the project ships a Dockerfile and a Docker Compose setup, with optional Prometheus metrics, Sentry error tracking, and S3-compatible storage configured through environment variables.
Key features
- 01Generates a text digest from a Git repository URL or a local directory.
- 02Reports file and directory structure, output size, and token count.
- 03Skips .gitignore entries by default, with an option to include them.
- 04Supports private repositories via a GitHub personal access token.
- 05Offers a CLI, a Python package, and a Jupyter-compatible async API.
Use cases
- Pasting a codebase into an LLM chat to ask questions about it.
- Giving an AI coding assistant context from a specific repository subdirectory.
- Estimating token size of a project before sending it to a model.
- Self-hosting a web tool for generating repository digests.
Quick start
- 1
Install gitingest with pip
pip install gitingest - 2
Run the CLI on a GitHub repository
gitingest https://github.com/coderamp-labs/gitingest
Things to know
- Private repositories require a GitHub Personal Access Token.
Topics
FAQ
- What is gitingest?
- Turns a Git repository or local directory into a single prompt-friendly text digest for feeding code to LLMs. Gitingest converts a Git repository, a subdirectory, or a local folder into one text file that summarizes the directory tree and concatenates the contents of the files. The output is shaped for pasting into LLM prompts, so developers can give a model the context of a codebase without manually copying files. Replacing 'hub' with 'ingest' in any GitHub URL produces the digest directly.
- Is gitingest free to use? What license does it have?
- gitingest is open source under the MIT license. Check the license terms before using it in commercial products.
- Is gitingest still maintained?
- Actively maintained. The last commit to gitingest was on Oct 17, 2026.
- What can I use gitingest for?
- Pasting a codebase into an LLM chat to ask questions about it. Giving an AI coding assistant context from a specific repository subdirectory. Estimating token size of a project before sending it to a model. Self-hosting a web tool for generating repository digests.
- How do I install gitingest?
- Install gitingest with pip: pip install gitingest Run the CLI on a GitHub repository: gitingest https://github.com/coderamp-labs/gitingest
- Where can I get gitingest?
- The source code and installation instructions are on GitHub: https://github.com/coderamp-labs/gitingest
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A self-improving AI agent that creates and refines skills from experience, runs on many model providers, and works through CLI and messaging apps.
AutoGPT is an open-source platform for building, running, and scheduling AI agents that carry out multi-step workflows from plain-English descriptions or a visual builder.
Compresses tool outputs, logs, files and RAG chunks before they reach an LLM, as a library, proxy or MCP server.
Open-source document parser that converts PDF, Office, HTML and other files into structured data for generative AI pipelines.
An open-source Go framework that organizes reusable AI prompts (called Patterns) by task and runs them from the command line or a REST API.