Gitingest: Transform GitHub Repositories into LLM-Friendly Code Extracts
This repository profile is provided by osrepos.com, an open source repository discovery platform.

Summary
Gitingest is a powerful tool designed to convert Git repositories into prompt-friendly text for Large Language Models (LLMs). It allows developers to easily obtain structured code extracts, making it simpler to feed codebase context into AI applications. With Gitingest, you can quickly generate digests from GitHub URLs or local directories, streamlining your AI-driven development workflows.
Repository Information
Topics
Click on any tag to explore related repositories
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Introduction
Gitingest is an innovative tool that streamlines the process of extracting code context from Git repositories, making it readily consumable by Large Language Models (LLMs). Its core functionality allows you to transform any Git repository, whether local or remote, into a clean, prompt-friendly text digest. A unique feature is the ability to simply replace "hub" with "ingest" in any GitHub URL to instantly access a structured extract of the codebase.
Key features include:
- Easy code context: Generate a text digest from a Git repository URL or a local directory.
- Smart Formatting: Output is optimized for LLM prompts, ensuring clarity and relevance.
- Comprehensive Statistics: Get insights into file and directory structure, extract size, and token count.
- Versatile Access: Available as a CLI tool, a Python package, and convenient browser extensions.
Installation
Gitingest requires Python 3.8 or newer. For private repositories, a GitHub Personal Access Token (PAT) is necessary.
You can install Gitingest via pip:
pip install gitingest
To include server dependencies for self-hosting, use:
pip install gitingest[server]
Alternatively, pipx is recommended for installing Python applications:
pipx install gitingest
Examples
Browser Extension Usage
The Gitingest browser extensions for Chrome, Firefox, and Edge offer a seamless way to get code digests directly from GitHub. Simply navigate to a GitHub repository page and replace "hub" in the URL with "ingest" to view the prompt-friendly extract.
Command Line Usage
The gitingest CLI tool provides powerful options for analyzing codebases.
Basic usage, writing to digest.txt by default:
gitingest /path/to/directory
From a GitHub URL:
gitingest https://github.com/coderamp-labs/gitingest
From a specific subdirectory within a repository:
gitingest https://github.com/coderamp-labs/gitingest/tree/main/src/gitingest/utils
For private repositories, use the --token option or set the GITHUB_TOKEN environment variable:
gitingest https://github.com/username/private-repo --token github_pat_...
Include repository submodules or gitignored files:
gitingest https://github.com/username/repo-with-submodules --include-submodules
gitingest /path/to/directory --include-gitignored
Output to a specific file or STDOUT:
gitingest /path/to/directory --output my_digest.txt
gitingest /path/to/directory --output -
Python Package Usage
Integrate Gitingest directly into your Python applications.
Synchronous usage:
from gitingest import ingest
summary, tree, content = ingest("path/to/directory")
# or from URL
summary, tree, content = ingest("https://github.com/coderamp-labs/gitingest")
Asynchronous usage:
from gitingest import ingest_async
import asyncio
result = asyncio.run(ingest_async("path/to/directory"))
In Jupyter notebooks, you can use await directly:
from gitingest import ingest_async
summary, tree, content = await ingest_async("path/to/directory")
Why Use Gitingest?
Gitingest simplifies the complex task of preparing codebases for AI consumption. By providing a structured, prompt-friendly text digest, it significantly reduces the effort required to feed relevant code context into LLMs. This is invaluable for tasks like code generation, analysis, documentation, and debugging with AI assistance. Its flexibility, offering CLI, Python library, and browser extension access, ensures it fits seamlessly into various developer workflows. Whether you need a quick overview or detailed code insights, Gitingest delivers optimized output for your AI-driven development needs.
Links
Related repositories
Similar repositories that may be relevant next.

Goon: Autonomous AI Worker for Software Development and Custom Workflows
September 15, 2026
Goon is a self-hosted, autonomous AI worker designed to streamline software development and automate custom workflows. Built with Go and having zero dependencies, it operates as a daemon, capable of tasks from writing code and opening PRs to summarizing emails and monitoring logs. It learns from your context and asks for human approval before acting, ensuring controlled and intelligent automation.

cc-polymath: Context-Efficient Skills for Claude Code Development
September 10, 2026
cc-polymath is an innovative GitHub repository offering a vast collection of atomic skills and workflows specifically designed for Claude Code. It addresses the challenge of providing comprehensive development knowledge without overwhelming the AI's context window. By employing a progressive discovery system, cc-polymath ensures context efficiency and high-quality skill access across a wide range of technical domains.

karpathy-llm-wiki: Build a Karpathy-Style LLM Knowledge Base
September 9, 2026
karpathy-llm-wiki is an Agent Skills-compatible tool that implements Karpathy's LLM Wiki idea, allowing users to build a durable knowledge base. It enables LLMs to maintain structured wiki pages by ingesting sources, compiling knowledge, and answering questions with citations. This project offers a robust alternative to traditional RAG for compounding knowledge over time.
AgenticSchema: Empowering AI Agents with Structured Web Data
September 8, 2026
AgenticSchema is an innovative open-source library that transforms existing Schema.org markup, including JSON-LD, Microdata, and RDFa, into callable tools for AI agents. This library operates entirely client-side, requiring no backend infrastructure, and significantly enhances an agent's ability to interact with web content. By leveraging structured data already present on millions of websites, AgenticSchema bridges the gap between web content and AI agent capabilities.
Source repository
Open the original repository on GitHub.
21 counted GitHub visits