gitingest
Local CLI tool that concatenates all non-gitignored text files in a repository into a single output, ready for pasting into LLMs.
Inspired by gitingest.com.
Install
pip install albeorla-gitingest
Usage
gitingest # current dir, copies to clipboard
gitingest ~/projects/myapp # specific repo
gitingest -i "*.py" -i "*.ts" # only include matching files
gitingest -e "*.test.*" -e "docs/*" # exclude patterns
gitingest -E .json -E .lock # exclude by extension
gitingest -F config.yaml # exclude specific filename at any depth
gitingest -m 100k # override size filter (default: 50k)
gitingest -o output.txt # write to file instead of clipboard
gitingest --stdout # print to stdout
gitingest -s # show file count and size stats
gitingest --show-defaults # list default exclusions
gitingest --no-defaults # include lock files, .DS_Store, etc.
Commit-scoped ingest
Use --commits to ingest only the files touched by specific commits. File contents come from the current working tree -- the commits just define which files to include.
# Files touched by two specific commits
gitingest --commits abc123 def456
# All files touched in a commit range
gitingest --commits abc123..def456
# Mix discrete commits and ranges
gitingest --commits abc123 def456..ghi789
# Combine with other filters
gitingest --commits abc123..def456 -e "*.test.*" -m 100k
Output
Produces a single text blob with:
- Header -- repo name, branch, commit, timestamp (plus commit scope if
--commitsis used) - Directory tree -- ASCII tree of included files
- File contents -- each file wrapped in
===separators
By default, output is copied to the clipboard (pbcopy on macOS) and saved to a temp file.
Defaults
- Max file size: 50 KB (override with
-m) - Binary files are skipped
- Lock files,
.DS_Store, minified JS/CSS, and sourcemaps are excluded (disable with--no-defaults) .gitignorerules are respected
Release files for albeorla-gitingest 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| albeorla_gitingest-0.1.0.tar.gz | 6.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| albeorla_gitingest-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.1 kB
Release files / albeorla_gitingest-0.1.0.tar.gz
| Download URL | albeorla_gitingest-0.1.0.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
351dd8f025cffdc4777afec7e95cbed304b458400487020f1923dbcc5d3de997
|
|
BLAKE2b-256 checksum How to use checksums |
850e6b7f6254523a983dfc4fca25e3f791e92cfa64f0f7e7f5ca9e6101357258
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.10
|
Release files / albeorla_gitingest-0.1.0-py3-none-any.whl
| Download URL | albeorla_gitingest-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9e5e15b7f937e6da1262712c7ef642b273ea501fbc6b0f81b2557091f93250e8
|
|
BLAKE2b-256 checksum How to use checksums |
ca04500717771e90355086ea7da515579860d1f070a5a1036a7e21c685c093dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.10
|