explaingit

coderamp-labs/gitingest

14,650Python

TLDR

Gitingest is a tool for turning a Git repository into a single text file that is easy to paste into a large language model prompt.

Mindmap

A visual breakdown will appear here once this repo is fully enriched.

In plain English

Gitingest is a tool for turning a Git repository into a single text file that is easy to paste into a large language model prompt. The basic idea is to take all the readable code and structure of a repo and pack it into one tidy dump, with statistics and a tree view, so an AI assistant has the full context. A neat trick the project advertises: you can replace hub with ingest in any GitHub URL (so github.com becomes gitingest.com) and get the digest for that repository from the hosted website. It comes in several forms. There is the hosted site at gitingest.com, browser extensions for Chrome, Firefox, and Microsoft Edge, a command line program, and a Python package. The README lists the main features as easy code context from either a Git URL or a local directory, an output format chosen to suit LLM prompts, and statistics about file and directory structure, the size of the extract, and the total token count. It requires Python 3.8 or newer, and a GitHub Personal Access Token is needed for private repositories. You can install gitingest from PyPI with pip, or with pipx if you prefer an isolated install. There is an optional server install for self hosting. The command line tool is called gitingest, and basic use is gitingest followed by a local path or a GitHub URL. It writes the digest to digest.txt by default. You can point it at a specific subdirectory, pass a token for private repos via a flag or the GITHUB_TOKEN environment variable, include git submodules, and include files normally ignored by .gitignore. The output destination can be changed with the --output flag, including writing to standard output for piping into other tools. In Python code, you import an ingest function from the gitingest package and call it on a path or URL. It returns three things: a summary, a tree, and the content. There is also an asynchronous version called ingest_async for use inside async code or Jupyter notebooks, where you can await it directly. Both forms accept a token argument for private repositories and an option to include submodules. The README also points to a separate self host section using Docker and to the open source browser extension repo at lcandy2/gitingest-extension for issues and feature requests.

Open on GitHub → Explain another repo

Generated 2026-05-21 · Model: sonnet-4-6 · Verify against the repo before relying on details.