Documentation
¶
Overview ¶
Command clidocs generates the "Commands and flags" section at the end of docs/cli.md and the man pages, from apic's own command tree, so the reference cannot drift from what the binary accepts. The hand-written parts of docs/cli.md (targets, exit codes, JSON shapes, examples) stay as they are; only the text between the markers is replaced.
go run ./scripts/clidocs rewrite docs/cli.md (task docs:cli) go run ./scripts/clidocs -check exit 1 when docs/cli.md is stale go run ./scripts/clidocs -man man write man/apic.1, man/apic-run.1, …
It lives under scripts/ rather than in the binary: nothing at run time needs it, and TestReferenceIsCurrent fails when the committed page is stale, so CI catches a flag added without regenerating.