SuperAPIAI Directory

gitingest

github.com · AI developer platforms

Gitingest is a tool that converts Git repositories into text summaries suitable for LLM prompts. Users can obtain a text extraction of a codebase by replacing "hub" with "ingest" in a GitHub URL, or by using the command-line tool, Python package, browser extension, and other methods. It provides intelligently formatted output, including statistics such as file and directory structure, extraction size, and token counts, supports private repositories (requires a GitHub PAT), and can be self-hosted via Docker.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux · 浏览器扩展

About this tool

Gitingest is designed to convert any Git repository into a text summary suitable for large language model (LLM) prompts, making it easy to use in code contexts.

Purpose

  • Obtain text summaries from Git repository URLs or directories to provide LLMs with easy-to-use code context.
  • Supports public and private repositories (private repositories require a GitHub personal access token, PAT).

Key capabilities

  • Intelligent formatting: The output format is optimized for LLM prompts.
  • Statistics: Provides file and directory structure, the size of the extracted content, and token counts.
  • Multiple usage methods:
    • Web service: Replace "hub" in any GitHub URL with "ingest" to access the corresponding summary (e.g., gitingest.com).
    • Browser extensions: Provides a Chrome extension and a Firefox add-on.
    • Command-line tool (CLI): Can be run as a shell command.
    • Python package: Can be imported and used in code.
    • Self-hosting: Deploy via Docker.

Usage

Installation

  • Install via PyPI:pip install gitingest(If server dependencies for self-hosting are needed, additional dependencies can be installed).
  • Installing with pipx is recommended:pipx install gitingest.

Command-line usage

  • Basic command:gitingest <repository_url>.
  • Private repositories: Use the --token/-t option to provide a PAT.
  • By default, files listed in .gitignore are skipped; use --include-gitignored to include these files.
  • By default, the summary is written to digest.txtin the current working directory; use --output/-o <filename> to specify an output file, or use --output/-o - to output to standard output (convenient for piping).
  • View more options:gitingest --help.

Python package usage

  • Import gitingest and call the relevant functions; a token can be passed for private repositories.
  • By default, no file is written; this can be enabled via the output parameter.
  • When using in a Jupyter notebook, note the asynchronous behavior.

Browser extensions

  • A Chrome extension and a Firefox add-on are available; the extension is open source at lcandy2/gitingest-extension.

Self-hosting (Docker)

  • Build the image:docker build -t gitingest .
  • Run the container:docker run -d --name gitingest -p 8000:8000 gitingest
  • The application can be accessed via http://localhost:8000 .
  • It can be configured via environment variables, such as ALLOWED_HOSTS、GITINGEST_METRICS_ENABLED、GITINGEST_SENTRY_ENABLED , etc.
  • Using Docker Compose: The project includes compose.yml, which defines the app(production),app-dev(development), and minio(S3-compatible storage for development) services.
    • Development mode:docker compose --profile dev up
    • Production mode:docker compose --profile prod up

Use cases

  • Developers need to quickly convert a codebase into text format for LLM analysis or prompting.
  • Code understanding, summarization, or question answering in LLM applications.
  • Extracting codebase structure in educational or research scenarios.

Limitations

  • Private repositories require a GitHub PAT.
  • By default, .gitignore files are skipped, which may omit some content.
  • Self-hosting requires a Docker environment.
  • Details such as specific performance, fees, pricing, and platform support are not yet provided.
Up/Down to navigate · Enter to open · ESC to closeBrowse all tools