Skip to main content

Concatenate repo files into a single LLM-ready document

Project description

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:

  1. Header -- repo name, branch, commit, timestamp (plus commit scope if --commits is used)
  2. Directory tree -- ASCII tree of included files
  3. 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)
  • .gitignore rules are respected

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

albeorla_gitingest-0.1.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

albeorla_gitingest-0.1.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file albeorla_gitingest-0.1.0.tar.gz.

File metadata

  • Download URL: albeorla_gitingest-0.1.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.10

File hashes

Hashes for albeorla_gitingest-0.1.0.tar.gz
Algorithm Hash digest
SHA256 351dd8f025cffdc4777afec7e95cbed304b458400487020f1923dbcc5d3de997
MD5 16bffc9dcf2e963e7707f4438ed09d28
BLAKE2b-256 850e6b7f6254523a983dfc4fca25e3f791e92cfa64f0f7e7f5ca9e6101357258

See more details on using hashes here.

File details

Details for the file albeorla_gitingest-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for albeorla_gitingest-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9e5e15b7f937e6da1262712c7ef642b273ea501fbc6b0f81b2557091f93250e8
MD5 8d51e064805b7aa9a2d342659c3c3a20
BLAKE2b-256 ca04500717771e90355086ea7da515579860d1f070a5a1036a7e21c685c093dd

See more details on using hashes here.

Supported by

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