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
Multi-account
ghusers:invocatorruns as whichever GitHub identitygh auth statusreports as active. If a repo lives in an org andREPO_NOT_FOUNDsurprises you, switch withgh auth switchbefore re-running.
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.
Metadata
Release files for invocator 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| invocator-0.1.5.tar.gz | 102.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| invocator-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 138.6 kB
Release files / invocator-0.1.5.tar.gz
| Download URL | invocator-0.1.5.tar.gz |
|---|---|
| Size | 102.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d6ec0e67de4fa7cebbfd43265e9b902735e2c17250c5d438ea8e61ef6ac2434d
|
|
BLAKE2b-256 checksum How to use checksums |
903fe2b8fb8a7a03e4f3cf2f38486bf478440bf2bfb89228b1d28203da3aeba1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / invocator-0.1.5-py3-none-any.whl
| Download URL | invocator-0.1.5-py3-none-any.whl |
|---|---|
| Size | 36.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d1a32520ffc46257712afa4a823ab0beb76bda4eb74a6e8dc71fcb0311930bd3
|
|
BLAKE2b-256 checksum How to use checksums |
e97a1333803c7f8c049c4cf0f2419c2d42cf43a465bbdcf56315749cdde93ec8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|