Repolode
coderamp-labs

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. 1

    Install gitingest with pip

    pip install gitingest
  2. 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