A spooky utility for data mining git repositories (and any folder foolish enough to hold still).
Project description
git-reaper
A spooky utility for data mining git repositories (and any folder foolish enough to hold still).
git-reaper reaps structured knowledge from repositories: it clones, gathers,
concatenates, and packs the contents of a git repo (or a plain directory) into
clean, portable artifacts. Library first; the CLI is a thin adapter over
git_reaper.core.
Install
uv tool install git-reaper # or: pip install git-reaper
Both reaper and git-reaper land on your PATH (the long form is the
fallback if the REAPER DAW already owns the short one).
Commands (v0.1.0)
| Command | What it does |
|---|---|
harvest |
Gather files matching a pattern (default *.md) from a path or repo URL and concatenate them into one artifact with a provenance header and per-file dividers. |
tree |
Hierarchical file listing as markdown or JSON. Depth limits, dirs-only, sizes, line counts, ignore rules. |
pulse |
Signs-of-life check: git present, optional extras, cache health. |
banish |
Clear the catacombs (the clone cache). --older-than 7d for partial exorcisms. |
reaper harvest https://github.com/Textualize/rich --pattern "*.md" -o RICH.md
reaper tree . --sizes --lines
reaper tree . --format json | jq .file_count
reaper pulse
reaper banish --older-than 7d
Behavior you can rely on
- Artifacts to stdout (or
--out); narration to stderr. Piping is always safe. - Deterministic output. Same repo state + same flags = byte-identical artifact (only the provenance timestamp moves).
- Provenance by default. Every artifact opens with source, ref/sha, timestamp, tool version, and the exact invocation.
- Ignore rules honored.
.gitignore+.reaperignore+--excludeglobs;.gitis never reaped. - Caps with receipts. Size caps and binary detection skip files loudly, never silently.
- The catacombs. Remote clones cache under
~/.cache/git-reaper/catacombs/<host>/<owner>/<repo>, shallow, reused across runs. Localfile://sources are buried flat (localhost/<name>-<digest>) to stay inside Windows path limits. - Published schemas. Every JSON-emitting command prints its JSON schema
with
--schema. --plain/NO_COLORproduce clean ASCII; non-tty output auto-disables the theatrics.- No telemetry. The dead tell no tales.
Library use
from git_reaper.core.source import resolve_source
from git_reaper.core.harvest import harvest
from git_reaper.formatters.markdown import write_harvest
repo = resolve_source("https://github.com/Textualize/rich").repo
result = harvest(repo, patterns=("*.md",))
with open("RICH.md", "w") as fh:
write_harvest(result, fh)
Development
Everything runs through uv and the Makefile:
make setup # create venv, install deps
make check # lint + typecheck + tests (the full gauntlet)
make fmt # auto-format and fix lint findings
make test # pytest
make cov # pytest with coverage
make docs # serve the docs locally
make run ARGS="tree ."
make build # sdist + wheel
The version comes from git tags (hatch-vcs); there is nothing to bump.
Publishing a GitHub release for a vX.Y.Z tag builds and uploads to PyPI
via trusted publishing, and docs deploy to GitHub Pages on every push to
main.
License
MIT. Rest in peace.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file git_reaper-0.1.0.tar.gz.
File metadata
- Download URL: git_reaper-0.1.0.tar.gz
- Upload date:
- Size: 121.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54f905785930df8e509fcd77885daa3ac791239a8a19aa50af6c1fb679ce6fed
|
|
| MD5 |
dde9571b53c53b96cfd974628c40cb7d
|
|
| BLAKE2b-256 |
72ad25812d96f474f9b6dc59fac2f778dfb579b09b07f87e635abcffd461f096
|
Provenance
The following attestation bundles were made for git_reaper-0.1.0.tar.gz:
Publisher:
publish.yml on jmcmeen/git-reaper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
git_reaper-0.1.0.tar.gz -
Subject digest:
54f905785930df8e509fcd77885daa3ac791239a8a19aa50af6c1fb679ce6fed - Sigstore transparency entry: 2044252868
- Sigstore integration time:
-
Permalink:
jmcmeen/git-reaper@99e5f848feeb48fccceb4222cc83a7abe0bb0471 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/jmcmeen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@99e5f848feeb48fccceb4222cc83a7abe0bb0471 -
Trigger Event:
release
-
Statement type:
File details
Details for the file git_reaper-0.1.0-py3-none-any.whl.
File metadata
- Download URL: git_reaper-0.1.0-py3-none-any.whl
- Upload date:
- Size: 28.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61fcda1962679d8e70296170901130e6d0a57f941f597627afac38113ff45cc9
|
|
| MD5 |
5b0a887a76679535bd44fbc0f95f944d
|
|
| BLAKE2b-256 |
2901a724d95054d626903c52764f13911bdf8f85faabfcf5a6050aeb8ca3f477
|
Provenance
The following attestation bundles were made for git_reaper-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on jmcmeen/git-reaper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
git_reaper-0.1.0-py3-none-any.whl -
Subject digest:
61fcda1962679d8e70296170901130e6d0a57f941f597627afac38113ff45cc9 - Sigstore transparency entry: 2044252893
- Sigstore integration time:
-
Permalink:
jmcmeen/git-reaper@99e5f848feeb48fccceb4222cc83a7abe0bb0471 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/jmcmeen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@99e5f848feeb48fccceb4222cc83a7abe0bb0471 -
Trigger Event:
release
-
Statement type: