Favicon of Gitingest

Gitingest

An open-source codebase digest tool for LLM prompts. Process local directories with Python or the CLI, self-host with Docker, or use the hosted website.

Screenshot of Gitingest website

Gitingest turns a Git repository or local directory into a text digest that developers can give to an LLM as code context. It combines the directory tree and file contents in one extract, so you don't have to assemble context file by file. It's open source under the MIT license.

You can run it locally through a command-line tool or use it as a Python package in your own code. The web interface is available as a hosted service, and you can self-host it with Docker. Local directory processing lets you prepare code on your machine; the hosted website clones and processes repositories on its backend.

The digest includes a summary, directory structure and file contents, with statistics for extract size and estimated token count. These help you judge how much code you're about to put into a prompt. Include and exclude filters let you choose the relevant files, and the command-line tool skips files covered by .gitignore by default. The website lets you copy individual sections or download the digest.

The output is plain text for use with any LLM, so Gitingest doesn't tie the extract to a particular model provider. Its Python package also lets developers make codebase extraction part of a larger application or workflow.

Private GitHub repositories require a personal access token. On the hosted service, the backend uses that token to clone the repository, then discards it from memory without storing it. The website doesn't cache the token in the browser, and it deletes cloned repositories after processing.

Similar to Gitingest