--- id: gitingest version: "0.3.1" 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) license_treatment: permissive maintenance: active --- # gitingest — CLI tool to analyze and create text dumps of codebases for LLMs License: permissive · Maintenance: active · Downloads: 107.8K/mo ## 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 above — 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 pip install gitingest uv add gitingest 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_current - Install friction: low - Maintenance: active - Downloads: 107.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags git repo to text for llm, codebase digest generator, repository text extraction, code context for ai, github repo summarizer, code ingest llm prompt, repository text dump, llm-integration, code-analysis, git-tooling [View on SkillFed](https://skillfed.io/packages/gitingest) · [View on PyPI](https://pypi.org/project/gitingest/)