v0.3.0
A new discover command walks the page-and-category graph breadth first, chaining the single-edge reads into one traversal.
The structure commands each answer one question about one page: its links, its
backlinks, its categories, a category's members. This release adds discover,
which chains them into a single breadth-first walk.
discover: walk the graph
wiki discover starts at one or more seeds and follows their links outward, hop
by hop, streaming one record per node as the node is reached. A seed is anything
wiki already resolves: an article title or URL, or a category name or URL.
wiki discover "Alan Turing"
wiki discover "Category:Turing Award laureates" --depth 2
The first row is the seed at depth 0; the rest are its neighbors, each tagged with the edge it arrived by, so the output reads as a graph rather than a flat list.
Choosing what to follow
There are two node kinds, page and category, and five edges between them:
links and backlinks (page to page), categories (page to category),
members (category to page), and subcats (category to category).
--follow takes a preset or a comma-separated edge list:
wiki discover "Alan Turing" # content (the default)
wiki discover "Alan Turing" --follow network # links and backlinks
wiki discover "Quantum computing" --follow cats # the category tree
wiki discover "Pi" --follow links,categories # an explicit edge mix
The presets are content (a page's links and categories, a category's members
and subcategories), network (both link directions), cats (the category
system), and all.
Bounding the walk
Three independent limits keep a walk finite, so a bare discover always
terminates: --depth (hops, default 1; 0 emits only the seeds), --fanout
(neighbors per edge, default 25; 0 for unlimited), and -n (total nodes,
default 500). A seed that cannot be fetched fails the walk; a failure deeper in
the walk becomes a one-line note on stderr and the traversal carries on.
wiki keeps no local database, so discover streams to stdout in any output
format. See the Discovering guide for the full tour.
Upgrade
go install github.com/tamnd/wikipedia-cli/cmd/wiki@latest
Prebuilt archives for Linux, macOS, and Windows on amd64 and arm64, plus deb,
rpm, and apk packages, a container image, and checksums, are on the
release page. The
binary is pure Go, builds with CGO_ENABLED=0, and has no runtime dependencies.
This release only adds the discover command; nothing else changes.