gitingest
CLI tool to analyze and create text dumps of codebases for LLMs
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 gitingestuv
uv add gitingestpoetry
poetry add gitingestInstalling 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
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
git-remote-s3Enables Git to use Amazon S3 as a remote…
permissive · top 15,000 on PyPI
ingestringestr is a command-line tool that copies data…
permissive · top 15,000 on PyPI
textual-universal-directorytreeProvides a DirectoryTree widget for Textual…
permissive · top 15,000 on PyPI
langextractLangExtract uses LLMs to extract and ground…
permissive · top 15,000 on PyPI
chonkieChonkie splits text into semantically…
permissive · top 5,000 on PyPI
git-remote-codecommitExtends Git to clone and push to AWS CodeCommit…
permissive · top 5,000 on PyPI
unstructured-ingestUnstructured Ingest is a local ETL pipeline…
permissive · top 15,000 on PyPI
llmlinguaLLMLingua compresses prompts by identifying and…
permissive · top 15,000 on PyPI
lintroLintro unifies code formatting, linting, and…
permissive · top 15,000 on PyPI
llama-indexLlamaIndex is a data framework that connects…
permissive · top 5,000 on PyPI