Extract synthesized engineering knowledge from a GitHub repo into a learnings/ folder.
Project description
invocator
Summon the accumulated wisdom of a GitHub repository into a
learnings/grimoire. ✨
invocator is a CLI that points at any GitHub repository, walks its PRs, issues, commits, and code-review conversations, and synthesizes that history into a folder of categorized markdown files — rules, prevenções, patterns, decisions, glossary — so the tacit knowledge living in a project's timeline becomes navigable documentation.
The three spells
| Spell | What it does |
|---|---|
invocator forge key |
Bind a pact with Anthropic — store and validate your API key |
invocator scry cost --repo owner/name |
Gaze ahead: cost / wall time / item counts before the ritual |
invocator extract wisdom --repo owner/name |
The full ritual — produces ./learnings/ |
Prerequisites
- Python 3.11+
ghCLI installed and authenticated (gh auth login) — invocator never callsapi.github.comdirectly- An Anthropic API key
Install
pipx install invocator # recommended
# or
uv tool install invocator
# or, from source
git clone https://github.com/Gab-r-x/invocator.git && cd invocator && pip install -e .
Quickstart
invocator forge key
invocator scry cost --repo OleveCo/CourseGPTBackend
invocator extract wisdom --repo OleveCo/CourseGPTBackend
After the ritual completes, ./learnings/ will contain six markdown files synthesized from the repo's history.
Output structure
| File | Contents |
|---|---|
rules.md |
Conventions and imperatives ("always X", "never Y") mined from review comments |
prevencoes.md |
Bug patterns, regressions, and pitfalls the team has already paid for |
patterns.md |
Refactors and architectural patterns that recur in the codebase |
decisions.md |
ADR-style decisions extracted from PRs and issues |
glossary.md |
Domain terms and named concepts that recur ≥3 times |
INDEX.md |
Run metadata: repo, timestamp, model, cost, per-file bullet counts |
How it works
- summon —
gh api --paginatepulls PRs, issues, commits, and review comments into a JSONL cache with per-resource watermarks (re-runs are incremental). - transmute — heuristics (conventional commits, review-cue regexes, labels, ADR detection, glossary mining) classify each item into one of five categories. SHA1 dedupe + top-K cap per category.
- inscribe — one Anthropic call per category, with explicit prompt caching, writes
learnings/<category>.md. A SHA256 corpus hash means re-runs without deltas are free (no LLM call).INDEX.mdis rendered deterministically.
Cost
Roughly $1–3 USD for medium-sized repos with claude-sonnet-4-6. Always preview with invocator scry cost --repo X first. Re-runs without changes are free thanks to the hash cache.
Troubleshooting
| Symptom | Fix |
|---|---|
gh: command not found |
Install gh: https://cli.github.com/ |
GH_NOT_AUTHENTICATED |
Run gh auth login |
NO_API_KEY |
Run invocator forge key |
CORPUS_TOO_LARGE |
Cap inputs: --top-k 100 |
| Want to re-fetch from scratch | invocator extract wisdom --repo X --force-refetch |
Contributing
This project follows a strict phased-todo workflow. Before contributing, read:
- CLAUDE.md — workflow and project rules
- docs/STANDARDS.md — the non-negotiable engineering rules
- docs/todos/README.md — operational contract for the executor → progress → tests pipeline
License
MIT — see LICENSE.
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
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 invocator-0.1.0.tar.gz.
File metadata
- Download URL: invocator-0.1.0.tar.gz
- Upload date:
- Size: 97.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2268c7f8e037536332584bf6eb4ddac0fd255aa1efe1fd066a4dc32ec7451fa2
|
|
| MD5 |
ddaac646150b27403a26caea204296e3
|
|
| BLAKE2b-256 |
e708df806dc17ef56d3c8d8a6c57a13a091aaed510a7b4e4bf1fdceb8ad8a50c
|
File details
Details for the file invocator-0.1.0-py3-none-any.whl.
File metadata
- Download URL: invocator-0.1.0-py3-none-any.whl
- Upload date:
- Size: 34.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97f003c45a40a200690eafcf1e67f23fa6aa3879485feba9004dd2d25b7c4436
|
|
| MD5 |
dcad8bf22e90319c62633401cccfaa2c
|
|
| BLAKE2b-256 |
92242f25aa7b7352b0dee9b1c953700e0bd5eb0adc1978c1f89fa696d106f2aa
|