skillfed

gitingest

CLI tool to analyze and create text dumps of codebases for LLMs

gitingest v0.3.1 107.8K downloads/30d#12,594 on PyPI15,302
Permissive license MIT License Copyright (c) 2024 Romain Courtois Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to… (full text in the JSON record) Active released

What it is and what it does

Gitingest is a CLI tool and Python library that transforms a Git repository—local path or GitHub URL—into a single text file optimized for LLM consumption. It extracts file structure, code content, and metadata (file count, total size, token count via tiktoken), then formats everything as a prompt-friendly digest. The tool respects .gitignore by default, supports private repositories with GitHub tokens, and can include submodules. It runs as a command-line utility (via click), a Python function (sync or async), or a self-hosted web service (via Starlette).

The package is designed for developers who need to feed entire codebases into language models for analysis, documentation generation, or code review. It handles the boilerplate of cloning, filtering, and formatting, leaving you with clean text ready for an LLM prompt. The library is young (first release late 2024) but actively maintained, with support for Python 3.8–3.13 and a permissive MIT license.

Use it for:

  • Feed a GitHub repository into an LLM for code review, refactoring suggestions, or documentation generation.
  • Generate a text summary of an open-source project to understand its structure before contributing.
  • Create a codebase digest to include in an LLM chat for debugging or architecture questions.
  • Automate extraction of private repository code for internal AI-assisted analysis workflows.
  • Build a web service that converts any public repo URL into an LLM-ready prompt via the self-hosted server.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Converts Git repositories into plain-text digests optimized for feeding into LLMs, with file structure, size, and token count statistics.

Yes. Low install friction, active maintenance, no known vulnerabilities, and a clear use case for anyone working with LLMs and codebases. The MIT license is unencumbered. Start with the CLI to test; the Python API and async support are available if you need programmatic integration.

Install

gitingest on PyPI

pip

pip install gitingest

uv

uv add gitingest

poetry

poetry add gitingest

Installing gitingest

Before you install

Low friction: pure Python wheel with 10 runtime dependencies including common libraries like click, httpx, and pydantic. Actively maintained with recent releases; last commit 2026-08-13.

License in practice

MIT License permits commercial and private use with minimal restrictions—include the license text and copyright notice in distributions.

Quickstart

pip install gitingest

from gitingest import ingest

summary, tree, content = ingest("https://github.com/coderamp-labs/gitingest")
print(summary)
print(content)

Requires Python 3.8+. For private repositories, a GitHub Personal Access Token must be provided via --token parameter or GITHUB_TOKEN environment variable.

Verify before relying

  • Whether token-based authentication works with GitHub Enterprise or other Git hosting platforms beyond github.com
  • Performance characteristics and memory usage on very large repositories (no size limits documented)
  • Whether the async API (ingest_async) is required for production use or optional for CLI/sync workflows

Package facts

License MIT License Copyright (c) 2024 Romain Courtois Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to… (full text in the JSON record) (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 10 — click, httpx, loguru, pathspec, pydantic, python-dotenv, starlette, strenum, tiktoken, typing_extensions
Maintenance actively maintained — 379 days since the last release
Last repo commit
First released
Downloads 107,802/month — #12,594 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: gitingest-0.3.1-py3-none-any.whl

Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

git repo to text for llmcodebase digest generatorrepository text extractioncode context for aigithub repo summarizercode ingest llm promptrepository text dump
llm-integrationcode-analysisgit-tooling

More Utilities packages