A config-driven knowledge-ingestion harness — the deterministic half of turning a source into a linked wiki article.
Project description
Quarry
A config-driven knowledge-ingestion harness — a CLI that owns the deterministic half of turning a source (a YouTube video, a web page, …) into a linked article in a markdown knowledge wiki.
Quarry resolves a source adapter, fetches, writes immutable raw material, hands a machine-readable compile-spec to an LLM (or human) for the one irreducibly-generative step — writing the article — then verifies provenance, lints, and commits. It never calls a model, so it is runnable and testable without API keys.
You extract raw material from the world and refine it into something structured. That is the pipeline, and the name.
Why
The deterministic mechanics of disciplined knowledge ingestion — fetch, immutable raw, a verifiable manifest, provenance checking, structural lint, semantic link discovery — are worth doing the same way every time. Quarry packages exactly that machinery and nothing else: it is not an LLM wrapper, not a note-taking app, and not opinionated about your wiki's shape. Every convention is configuration.
Install
pip install quarry-kb[all] # all shipped adapters
pip install quarry-kb # core only (PyYAML); add adapters as extras
Adapters (each an extra): youtube (transcript + Whisper fallback), web, reddit
(stdlib), github (gitingest), pdf (PyMuPDF4LLM + OCR), instagram (best-effort),
plus whisper for local audio transcription. Adapters extract raw content
deterministically — no LLM, no API key.
Installed as
quarry-kbon PyPI (the bare name was taken); the command and import are bothquarry.
Requires Python 3.11+.
60-second quickstart
cd your-wiki-repo
quarry init # scaffold a documented quarry.toml + gitignore .quarry/
# edit quarry.toml to match your wiki's conventions
quarry ingest <url> # fetch -> raw/ + compile-manifest, then STOP
# ...now write the wiki article using the printed compile-spec...
quarry finish <slug> # verify provenance -> lint -> commit (no push unless --push)
Other commands: quarry lint, quarry adapters, quarry related <article>,
quarry densify [--apply], quarry doctor.
The two-call seam is deliberate: ingest and finish are separate processes, and the
generative step (writing the article) happens between them — done by you or your agent,
never by Quarry.
Configuration reference
Quarry is configured by a quarry.toml discovered by walking up from the current
directory (a [tool.quarry] table in pyproject.toml is a fallback). quarry init
writes a fully-commented default. Tables:
| Table | Key | Purpose |
|---|---|---|
[store] |
wiki, raw, manifest_dir |
directories (relative to the store root) |
raw_layout |
raw path template; tokens: {year} {month} {date} {slug} {kebab_title} {ext} {topic} {source_id} |
|
root |
explicit store root (defaults to the dir containing quarry.toml) |
|
[frontmatter] |
required, sources_field, related_field |
article frontmatter schema |
[ingest] |
default_ext, slug, on_duplicate |
slug template; on_duplicate = refuse | warn | allow |
[adapters] |
enabled |
allowlist of adapters to run |
[discovery] |
backend, mode, collection, dedup_threshold, densify_topk |
semantic-link backend (qmd or none) |
[lint] |
broken_links, require_sources_on_disk, orphan_check, index_file, fail_on |
which checks run and which fail the build |
[finish] |
run_lint, auto_push, commit_template |
finish behaviour |
See examples/quarry.toml for the annotated default.
Authoring an adapter
A new source type is one small adapter discoverable via the quarry.adapters
entry-point group — no fork. See CONTRIBUTING.md for the contract,
the hermetic-test requirement, and a worked pdf example.
Status
Pre-1.0, but feature-complete for v1 and fully tested. See SPEC.md for the
design and ISA.md for the ideal-state criteria and build provenance.
License
MIT — see LICENSE.
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 quarry_kb-0.2.2.tar.gz.
File metadata
- Download URL: quarry_kb-0.2.2.tar.gz
- Upload date:
- Size: 65.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e64900b3afdcb6458784a394c6273071dc5d2a3a024dc48d77896a9a025f3c87
|
|
| MD5 |
a39041188a0649c1a964d45a480c70b6
|
|
| BLAKE2b-256 |
5ec5706a852a1d549ad860a575ef86b486e264e1501b05d18235e93c0ca4d8fb
|
Provenance
The following attestation bundles were made for quarry_kb-0.2.2.tar.gz:
Publisher:
ci.yml on asachs/quarry-kb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quarry_kb-0.2.2.tar.gz -
Subject digest:
e64900b3afdcb6458784a394c6273071dc5d2a3a024dc48d77896a9a025f3c87 - Sigstore transparency entry: 2006487763
- Sigstore integration time:
-
Permalink:
asachs/quarry-kb@b52b2bda8646b9719a76adfc1398c661c8300fac -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/asachs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@b52b2bda8646b9719a76adfc1398c661c8300fac -
Trigger Event:
push
-
Statement type:
File details
Details for the file quarry_kb-0.2.2-py3-none-any.whl.
File metadata
- Download URL: quarry_kb-0.2.2-py3-none-any.whl
- Upload date:
- Size: 38.4 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 |
4a93946233852a6759e9c745ac4839c5285de3c376f6b629039295b0fc20fe6e
|
|
| MD5 |
05319423f8c37d4ac049801d427e17b6
|
|
| BLAKE2b-256 |
918386fc7db2eb8b5f6a82bae8e8a0d834ca533ed2bcf7ec543cacc1c0ba384a
|
Provenance
The following attestation bundles were made for quarry_kb-0.2.2-py3-none-any.whl:
Publisher:
ci.yml on asachs/quarry-kb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quarry_kb-0.2.2-py3-none-any.whl -
Subject digest:
4a93946233852a6759e9c745ac4839c5285de3c376f6b629039295b0fc20fe6e - Sigstore transparency entry: 2006487860
- Sigstore integration time:
-
Permalink:
asachs/quarry-kb@b52b2bda8646b9719a76adfc1398c661c8300fac -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/asachs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@b52b2bda8646b9719a76adfc1398c661c8300fac -
Trigger Event:
push
-
Statement type: