Skip to main content

CLI tool to analyze and create text dumps of codebases for LLMs

Project description

Gitingest

Image

License PyPI version GitHub stars Downloads

Discord

Turn any Git repository into a prompt-friendly text ingest for LLMs.

You can also replace hub with ingest in any GitHub URL to access the coresponding digest.

gitingest.com · Chrome Extension · Firefox Add-on

🚀 Features

  • Easy code context: Get a text digest from a Git repository URL or a directory
  • Smart Formatting: Optimized output format for LLM prompts
  • Statistics about:
    • File and directory structure
    • Size of the extract
    • Token count
  • CLI tool: Run it as a shell command
  • Python package: Import it in your code

📦 Installation

pip install gitingest

🧩 Browser Extension Usage

Available in the Chrome Web Store Get The Add-on for Firefox Get from the Edge Add-ons

The extension is open source at lcandy2/gitingest-extension.

Issues and feature requests are welcome to the repo.

💡 Command line usage

The gitingest command line tool allows you to analyze codebases and create a text dump of their contents.

# Basic usage
gitingest /path/to/directory

# From URL
gitingest https://github.com/cyclotruc/gitingest

# See more options
gitingest --help

This will write the digest in a text file (default digest.txt) in your current working directory.

🐛 Python package usage

# Synchronous usage
from gitingest import ingest

summary, tree, content = ingest("path/to/directory")

# or from URL
summary, tree, content = ingest("https://github.com/cyclotruc/gitingest")

# Asynchronous usage
from gitingest import ingest_async
import asyncio

result = asyncio.run(ingest_async("path/to/directory"))

By default, this won't write a file but can be enabled with the output argument.

🌐 Self-host

  1. Build the image:

    docker build -t gitingest .
    
  2. Run the container:

    docker run -d --name gitingest -p 8000:8000 gitingest
    

The application will be available at http://localhost:8000.

If you are hosting it on a domain, you can specify the allowed hostnames via env variable ALLOWED_HOSTS.

# Default: "gitingest.com, *.gitingest.com, localhost, 127.0.0.1".
ALLOWED_HOSTS="example.com, localhost, 127.0.0.1"

✔️ Contributing to Gitingest

Non-technical ways to contribute

  • Create an Issue: If you find a bug or have an idea for a new feature, please create an issue on GitHub. This will help us track and prioritize your request.
  • Spread the Word: If you like Gitingest, please share it with your friends, colleagues, and on social media. This will help us grow the community and make Gitingest even better.
  • Use Gitingest: The best feedback comes from real-world usage! If you encounter any issues or have ideas for improvement, please let us know by creating an issue on GitHub or by reaching out to us on Discord.

Technical ways to contribute

Gitingest aims to be friendly for first time contributors, with a simple python and html codebase. If you need any help while working with the code, reach out to us on Discord. For detailed instructions on how to make a pull request, see CONTRIBUTING.md.

🛠️ Stack

Looking for a JavaScript/Node package?

Check out the NPM alternative 📦 Repomix: https://github.com/yamadashy/repomix

Project Growth

Star History Chart

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gitingest-0.1.3.tar.gz (40.7 kB view details)

Uploaded Source

Built Distribution

gitingest-0.1.3-py3-none-any.whl (37.0 kB view details)

Uploaded Python 3

File details

Details for the file gitingest-0.1.3.tar.gz.

File metadata

  • Download URL: gitingest-0.1.3.tar.gz
  • Upload date:
  • Size: 40.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for gitingest-0.1.3.tar.gz
Algorithm Hash digest
SHA256 e54e2a23391d06cef0eefcd3479397d7d86d0b2ff5dbe2df74dc189fc3255628
MD5 0f2964be86d5c154fadcad8e33fd90eb
BLAKE2b-256 20538db9852d55c364f8affc8496beefe97f608c08f86021592d9c601e199925

See more details on using hashes here.

Provenance

The following attestation bundles were made for gitingest-0.1.3.tar.gz:

Publisher: publish.yml on cyclotruc/gitingest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gitingest-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: gitingest-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 37.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for gitingest-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a24db79888c966bc13222eb6899e662a5ff50d32e29c60013530a2575425279d
MD5 78016b9b75478478522410c9fcb1b0ed
BLAKE2b-256 ddd1968660876247ba8d7e8c0ddfbc78b2ee7558e82a3b6da875cc308bab535a

See more details on using hashes here.

Provenance

The following attestation bundles were made for gitingest-0.1.3-py3-none-any.whl:

Publisher: publish.yml on cyclotruc/gitingest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page