coderamp-labs /gitingest
Replace 'hub' with 'ingest' in any GitHub URL to get a prompt-friendly extract of a codebase
★ 16,142⑂ 1,217👁 57⑃ 370● 241▤ 7
+3
日增长
16,142
stars
1,217
forks
57
watchers
370
prs
241
issues
7
releases
README
Gitingest
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
Deutsch |
Español |
Français |
日本語 |
한국어 |
Português |
Русский |
中文
🚀 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
📚 Requirements
- Python 3.8+
- For private repositories: A GitHub Personal Access Token (PAT). Generate your token here!
📦 Installation
Gitingest is available on PyPI.
You can install it using pip:
bash
pip install gitingest
or
bash
pip install gitingest[server]
to include server dependencies for self-hosting.
However, it might be a good idea to use pipx to install it.
You can install pipx using your preferred package manager.
bash
brew install pipx
apt install pipx
scoop install pipx
...
If you are using pipx for the first time, run:
bash
pipx ensurepath
bash
install gitingest
pipx install gitingest
🧩 Browser Extension Usage
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.
bash
Basic usage (writes to digest.txt by default)
gitingest /path/to/directory
From URL
gitingest https://github.com/coderamp-labs/gitingest
or from specific subdirectory
gitingest https://github.com/coderamp-labs/gitingest/tree/main/src/gitingest/utils
For private repositories, use the --token/-t option.
bash
Get your token from https://github.com/settings/personal-access-tokens
gitingest https://github.com/username/private-repo --token github_pat_...
Or set it as an environment variable
export GITHUB_TOKEN=github_pat_...
gitingest https://github.com/username/private-repo
Include repository submodules
gitingest https://github.com/username/repo-with-submodules --include-submodules
By default, files listed in .gitignore are skipped. Use --include-gitignored if you
need those files in the digest.
By default, the digest is written to a text file (digest.txt) in your current working directory. You can customize the output in two ways:
- Use --output/-o to write to a specific file.
- Use --output/-o - to output directly to STDOUT (useful for piping to other tools).
See more options and usage details with:
bash
gitingest --help
🐍 Python package usage
python
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")
or from a specific subdirTop issues
#585(bug): include filter not work for SYMLINK5 comments · 2026-06-17#606(bug): -b/--branch and /tree/<branch> URLs still ingest the default branch (follow-up to #574)2 comments · 2026-09-21#605Access token is written to logs and to RuntimeError messages when cloning with a token (0.3.1)1 comments · 2026-09-08#613(bug): Why my markdown file was misrecognized as a binary file0 comments · 2026-10-24#609(bug): max_file_size is ignored when ingesting a single local file0 comments · 2026-10-13#608(bug): Image-only notebook outputs discard all notebook source cells0 comments · 2026-10-13#492Dependency Dashboard0 comments · 2025-08-05
Discussions
#612GitIngest included in AgentManager's tool catalog0 comments · 2026-10-18#588Can Gitingest users test a no-write graph proof against a prompt digest?0 comments · 2026-06-17#534add API REST for GitIngest0 comments · 2025-09-22#402New Gitingest update1 comments · 2025-07-12#268Comparison with Repomix (and other similar tools)0 comments · 2025-05-20
Latest release
v0.3.1 v0.3.1 2025-07-310.3.1 (2025-07-31) Bug Fixes make cache aware of subpaths (481) (8b59bef)