OINK CLI
oink is an optional command-line tool for OINK sites. It checks the links,
anchors and translations in Hugo’s real output, creates a site from the
Starter, and previews a theme upgrade before writing it. Hugo still renders
the site, and a project you manage with oink remains an ordinary Hugo
repository.
Every OINK site builds and previews with plain hugo and hugo server; you
do not need the CLI. It is developed in its own repository,
pgsty/oink-cli, with its own version and
release cycle, and is currently a local 0.1.0-dev candidate: there is no
published binary or installer yet, and its commands may still change.
What it does
| Command | Purpose |
|---|---|
oink init |
Create a site from a fixed Starter and select its profile and languages. |
oink doctor |
Inspect tools, configuration, and the resolved theme source. |
oink check |
Check rendered links, translation relationships, and source/style rules. |
oink dev / oink build |
Run Hugo’s preview server or production build. |
oink new / oink move |
Preview page creation or moves before applying a saved plan. |
oink translations |
Inspect translation status and diffs, and record human reviews. |
oink upgrade |
Compare a theme upgrade before writing module changes. |
Every command can also report in JSON or YAML (--json, --yaml) for
scripts and CI, and the CLI can check several explicitly registered sites
together and produce checked build artifacts. It has no editor of its own:
write in your usual editor, preview with oink dev, and use oink inspect or
oink check for structured diagnostics.
Try the local candidate
Build the binary from a checkout of oink-cli with Go and Make:
Replace ../my-docs with the path to your site. make deps is the only step
that downloads anything (the Go build dependencies); the CLI itself runs
offline unless you pass --network to a command that needs remote inputs it
has not cached.
The candidate’s site commands still expect an older Hugo Extended build, even
though OINK itself uses plain CSS and is tested on Hugo 0.170+. oink init
copies a Starter snapshot pinned to OINK v1.3.2, so follow the
upgrade guide to bring a generated site to the current
release.
Previews change nothing: new, move and upgrade leave site sources
untouched until you run the explicit apply step (oink plans apply for a
saved plan, oink upgrade --write --expect-plan ID for an upgrade). dev and build write
Hugo’s normal output and caches.
Further reading
- CLI contract: every supported command, what it may change, and the maintainer rules.
- Maintenance roadmap: the historical development stages and which of them were retired.