Commands
Full CLI command reference and behavior notes.
Command list
notepub index
notepub serve
notepub build
notepub validate
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
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
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.
Exit codes
0success1runtime/config/content errors2usage/flag errors