| name | gutenkg |
| description | Expert knowledge for the gutenkg CLI โ GutenbergKG Knowledge Press for downloading, ingesting, and managing a Project Gutenberg text corpus. Use when asked about: downloading books (book/catalog/search/fetch-genre), Internet Archive downloads (ia download/catalog/search/survey), genre management (init/add/list/list-genres), building DocKG indices (ingest), rebuilding indices after clone, author index, corpus status/survey, snapshots (save/list/show/diff), live stats (status), 3-D visualiser (viz3d), growth timeline (viz-timeline), batch workflows, catalog file format, corpus layout, text-to-markdown pipeline, or Gutenberg IDs. Repo: /Users/egs/repos/gutenberg_kg/.
|
gutenkg Skill
gutenkg is the CLI for GutenbergKG (v1.2.0). Run from repo root after poetry install.
Repo: /Users/egs/repos/gutenberg_kg/
Catalog files: scripts/catalogs/<genre>.txt
Corpus: corpus/
Snapshots: corpus/.snapshots/
Standard Batch Workflow (add books from wishlist)
gutenkg download catalog scripts/catalogs/philosophy.txt --genre philosophy
gutenkg ingest --genre philosophy
gutenkg authors
gutenkg snapshot save
git add corpus/philosophy/
git commit -m "feat: add philosophy batch"
git push
Multi-genre: download all catalogs first, then gutenkg ingest once (skips already-built books).
Common Operations
Single book
gutenkg download search --author "Herman Melville"
gutenkg download book 2701 --genre american-literature
gutenkg ingest --genre american-literature
Internet Archive book
gutenkg ia search "audel electricians"
gutenkg ia download audelselectriciansguide01ande --genre audel-electric
gutenkg ingest --genre audel-electric
Add a brand-new genre
gutenkg genres add medieval-literature --source gutenberg
gutenkg download catalog scripts/catalogs/medieval-literature.txt --genre medieval-literature
gutenkg ingest --genre medieval-literature
After cloning (indices are gitignored)
gutenkg rebuild-indices
gutenkg rebuild-indices --genre philosophy
Status check
gutenkg status
gutenkg status --json
gutenkg status --update-readme
gutenkg download survey
Snapshots
gutenkg snapshot save
gutenkg snapshot list
gutenkg snapshot show
gutenkg snapshot diff
Visualisation
gutenkg viz3d
gutenkg viz-timeline
gutenkg viz-timeline --type 3d
Force re-download / force rebuild
gutenkg download book 2701 --genre american-literature --force
gutenkg ingest --force-build --genre philosophy
Command Reference
Full flags and options: see references/commands.md.
| Group | Key flags |
|---|
download book <id> | --genre, --force, --dry-run |
download catalog <file> | --genre, --force, --dry-run |
download search "<q>" | --author, --title, --subject, --language, --max-results |
download fetch-genre <g> | --query, --yes, --dry-run |
download survey | --genre |
ingest | --genre (repeatable), --force-build, --force-register, --push, --dry-run, --registry |
ia download <id> | --genre, --title, --force, --dry-run |
ia catalog <file> | --genre, --force, --dry-run |
ia search <q> | --max-results |
ia survey | --genre |
genres add <name> | --source gutenberg|ia |
genres init / list | โ |
list-genres | โ |
authors | --refresh, --dry-run |
rebuild-indices | --genre, --force-build |
snapshot save/list/show/diff | โ |
status | --json, --update-readme, --registry |
viz3d | --corpus, --width, --height |
viz-timeline | --snapshots, --type [2d|3d] |
Catalog File Format
# Lines starting with # are comments
600 Notes from Underground # id[TAB title_override]
52263 Twilight of the Idols
2680 # id only โ title pulled from OPDS
Three columns: <gutenberg_id>[\t<title_override>[\t<genre_override>]]
IA catalog format: <ia_identifier>[\t<genre>] (one per line, # comments OK)
Corpus Layout
corpus/
โโโ genres.json # genre registry (single source of truth)
โโโ .snapshots/ # snapshot-*.json files (gitignored)
โโโ <genre>/
โ โโโ <Book Title>/
โ โโโ <slug>.md # full text with Markdown heading tree
โ โโโ reference.md # author provenance + PG metadata
โ โโโ .dockg/ # gitignored โ built by ingest
โโโ authors/
โโโ index.md
โโโ <author_slug>/author.md
Key Gutenberg IDs
| Work | Gutenberg ID | Genre |
|---|
| Tolstoy Death of Ivan Ilyich | 600 | russian-literature |
| Nietzsche Twilight of the Idols | 52263 | philosophy |
| Seneca Letters to Lucilius | search: gutenkg download search --author "Seneca" | ancient-classical |
Note: Long and Hays translations of Meditations are under copyright โ not on Gutenberg. Corpus file #2680 uses the Casaubon translation (only public-domain English MA on PG).
Pitfalls
--force required to re-download a book whose <slug>.md already exists.
ingest skips books with an existing .dockg/ โ use --force-build to rebuild.
.dockg/ is gitignored โ always run rebuild-indices after a fresh clone.
download search is slow โ prefer catalog files for known IDs.
gutenkg download search โ download fetch-genre for whole-genre interactive flow.
snapshot requires prior gutenkg ingest โ viz-timeline needs at least one saved snapshot.
viz3d shows only ingested books (with .dockg/graph.sqlite) โ run ingest first.
status reads SQLite directly โ does not require a rebuild and is safe for CI.