The Principal Dev โ€“ Masterclass for Tech Leads

The Principal Dev โ€“ Masterclass for Tech LeadsJuly 17-18

Join

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 corresponding digest.

gitingest.com ยท Chrome Extension ยท Firefox Add-on

๐Ÿš€ Features

๐Ÿ“š Requirements

๐Ÿ“ฆ Installation

Gitingest is available on PyPI. You can install it using pip:

pip install gitingest

However, it might be a good idea to use pipx to install it. You can install pipx using your preferred package manager.

brew install pipx
apt install pipx
scoop install pipx
...

If you are using pipx for the first time, run:

pipx ensurepath
# install gitingest
pipx 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")

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

# Asynchronous usage
from gitingest import ingest_async
import asyncio

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

Jupyter notebook usage

from gitingest import ingest_async

# Use await directly in Jupyter
summary, tree, content = await ingest_async("path/to/directory")

This is because Jupyter notebooks are asynchronous by default.

๐Ÿณ 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

Non-technical ways to contribute

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/FileSystemNode package?

Check out the NPM alternative ๐Ÿ“ฆ Repomix: https://github.com/yamadashy/repomix

๐Ÿš€ Project Growth

Star History Chart

Join libs.tech

...and unlock some superpowers

GitHub

We won't share your data with anyone else.