DISCOVER THE FUTURE OF AI AGENTSarrow_forward

Gitingest

calendar_todayAdded Feb 24, 2026
categoryAgent & Tooling
codeOpen Source
Python大语言模型FastAPIRAGWeb ApplicationSDKCLIAgent & ToolingModel & Inference FrameworkDeveloper Tools & CodingKnowledge Management, Retrieval & RAG

CLI tool that transforms Git repositories into prompt-friendly text digests for LLMs, featuring web access, browser extensions, Python SDK, and private repo support.

Project Overview#

Gitingest is an open-source tool designed to bridge the context gap for LLMs when handling code tasks. It parses local directories or GitHub repositories to generate a single text file containing the directory tree and code content, automatically estimating token count.

Project Info:

  • Maintainer: Filip Christiansen (cyclotruc)
  • Organization: coderamp-labs
  • Latest Release: v0.3.1 (July 2025)
  • Development Status: Alpha (3)
  • Contributors: 59+

Core Capabilities#

Input Sources#

  • Local Directory: Direct parsing of local file system paths
  • GitHub URL: Support for repo addresses, specific branches, tags, commits, or subdirectory URLs
  • Private Repositories: Access via GitHub Personal Access Token (--token)
  • Git Submodules: Include submodule content via --include-submodules

Output Features#

  • Structured Summary: Project statistics (file count, size) and directory tree
  • Prompt Optimization: Output format designed for LLM context windows
  • Token Estimation: Uses tiktoken to estimate token consumption
  • Flexible Output: Default to digest.txt, supports custom filenames or STDOUT

Usage Methods#

Command Line (CLI)#

# Install
pip install gitingest
# Or recommended via pipx
pipx install gitingest

# Basic usage
gitingest /path/to/directory
gitingest https://github.com/coderamp-labs/gitingest

# Output to console
gitingest https://github.com/username/repo -o -

# Access private repo
gitingest https://github.com/username/private-repo --token ghp_xxxx

Python SDK#

from gitingest import ingest, ingest_async

# Sync call
summary, tree, content = ingest("path/to/dir")

# Async call
result = await ingest_async("path/to/directory")

Web Interface#

  • Direct access via https://gitingest.com/owner/repo
  • URL trick: Replace hub with ingest in any GitHub URL to get the corresponding text digest

Deployment Options#

Docker#

docker build -t gitingest .
docker run -d -p 8000:8000 gitingest

# Or using Docker Compose
docker compose --profile prod up -d

Server Dependencies#

pip install gitingest[server]

Environment Configuration#

Basic Config:

  • GITHUB_TOKEN: GitHub Personal Access Token
  • ALLOWED_HOSTS: Allowed hostname list

Monitoring & Logging:

  • GITINGEST_METRICS_ENABLED: Enable Prometheus metrics server
  • GITINGEST_METRICS_HOST/GITINGEST_METRICS_PORT: Metrics server config
  • GITINGEST_SENTRY_ENABLED/GITINGEST_SENTRY_DSN: Sentry error tracking

S3 Storage:

  • S3_ENDPOINT, S3_ACCESS_KEY, S3_SECRET_KEY, S3_BUCKET_NAME, S3_REGION

Technical Implementation#

  • Languages: Python (81.4%), Jinja (10.0%), JavaScript (7.3%)
  • Web Framework: FastAPI
  • Frontend: Tailwind CSS, Jinja2 templates
  • Git Operations: GitPython
  • Token Calculation: tiktoken

Browser Extensions#

  • Chrome: Official extension for one-click digest generation on GitHub pages
  • Firefox: Official extension available

Use Cases#

  • LLM-Assisted Coding: Quickly provide full project context to ChatGPT, Claude, etc.
  • Code Review: Generate lightweight text snapshots for archiving or review
  • Knowledge Base Building: Convert codebases to text for RAG systems
  • Code Migration Analysis: Analyze source code structure to support migration decisions

Related Projects

View All arrow_forward

STAY UPDATED

Get the latest AI tools and trends delivered straight to your inbox. No spam, just intelligence.

rocket_launch