Commands
Full reference of notepub CLI commands — index, serve, build, validate, audit, type add, template — with flags and exit codes.
Command list
notepub index
notepub serve
notepub build
notepub validate
notepub audit
notepub type add <name>
notepub template check
notepub template update --apply
notepub help
notepub version
Shared path precedence
Config path resolution:
--configCONFIG_PATHconfig.yaml
Rules path resolution:
--rulesRULES_PATHrules_pathfrom configrules.yamlnear config/current directory fallback
index
notepub index --config ./config.yaml --rules ./rules.yaml
- validates rules
- scans source content
- updates snapshot and artifacts
- fails if content/rules validation fails
serve
notepub serve --config ./config.yaml --rules ./rules.yaml --addr :8081
- loads theme and resolve store
- serves routes, assets, media, search endpoints
- supports graceful shutdown on SIGINT/SIGTERM
build
notepub build --config ./config.yaml --rules ./rules.yaml --dist ./dist
Flags:
--distoutput directory--artifactsartifacts directory--no-indexdo not auto-index when resolve is missing--generate-searchgeneratesearch.jsonwhen missing
validate
notepub validate --config ./config.yaml --rules ./rules.yaml --links
Flags:
--resolveexplicit resolve path--linksvalidate resolved links (requires resolve.json)--markdownrun markdown diagnostics--markdown-strictfail command on markdown warnings--markdown-format text|jsondiagnostics output format--output <path>write markdown diagnostics report to file--seocheck titles, descriptions, isolated pages, robots and lastmod (SEO Reference)--seo-strictfail command on SEO warnings--seo-format text|jsonSEO findings output format
Examples:
notepub validate --config ./config.yaml --rules ./rules.yaml --resolve ./artifacts/resolve.json --markdown
notepub validate --config ./config.yaml --rules ./rules.yaml --resolve ./artifacts/resolve.json --markdown --markdown-strict
notepub validate --config ./config.yaml --rules ./rules.yaml --resolve ./artifacts/resolve.json --seo
audit
notepub audit --config ./config.yaml --dist ./dist
notepub audit --dist ./dist --base-url https://example.com/docs/ --strict
Checks the built site the way a crawler meets it, without network: titles, descriptions, headings, canonical, OpenGraph and the og:image size, favicon, viewport, JSON-LD, alt, links and images that lead nowhere or only through a redirect, pages no other page links to (menus included), robots.txt, the sitemap against the build, llms.txt, 404.html. Codes and levels — SEO Reference.
Flags:
--distthe built site (default./dist)--configreadsite.base_urlfrom it--base-urlthe address the site is served at (overrides config)--strictfail on warnings as well as errors--format text|jsonoutput format
Errors always fail the command, so a deploy step stops on a broken link.
type add
notepub type add service
notepub type add case --permalink "/cases/{{ slug }}/" --from article.html
Adds a kind of page: the type in rules.yaml (comments, order and indentation kept) and its template, copied from page.html. A note with type: service becomes a page at /service/<slug>/ on the next build.
Flags:
--permalinkaddress pattern (default/<name>/{{ slug }}/)--templatetemplate file name (default<name>.html); an existing one is kept--fromtemplate to copy (defaultpage.html)--no-sitemap,--no-searchleave the type out of the sitemap or search--config,--rulesas in other commands
template check / template update
notepub template check
notepub template update
notepub template update --apply
template check: reports infrastructure status and manual review findings.template update: dry run by default.template update --apply: updates recognized infrastructure files (build scripts/workflows/config wiring), while leaving content unchanged.template checkalso reports whether pages are dated by commits and whether the build runs the SEO check.
Exit codes
0success1runtime/config/content errors2usage/flag errors