Metadata-Version: 2.4
Name: albeorla-gitingest
Version: 0.1.0
Summary: Concatenate repo files into a single LLM-ready document
Project-URL: Homepage, https://github.com/albeorla/albeorla-gitingest
Project-URL: Repository, https://github.com/albeorla/albeorla-gitingest
Author: albeorla
License-Expression: MIT
Keywords: concatenate,git,ingest,llm,repository
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# 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](https://gitingest.com/).

## Install

```bash
pip install albeorla-gitingest
```

## Usage

```bash
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.

```bash
# 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
