Documentation
¶
Overview ¶
Command wikigen generates one wiki page per top-level CLI command.
Purpose: the wiki had cmd-*.md pages for most but not all commands, written by hand at different times, so flag tables and subcommand lists drifted from the binary and new commands shipped undocumented. Everything cobra already knows (title, synopsis, flags with defaults, subcommands, nav) is now generated; the parts that need a human (description, examples, see-also) live in PROSE blocks that regeneration never touches.
Pages live at the wiki root, not in commands/: GitHub Wiki flattens the namespace, so .github/wiki/cmd-db.md and .github/wiki/commands/cmd-db.md would be the same published page.
Inputs: -dir (wiki commands directory), -check (verify, write nothing), -report (list pages still carrying placeholder prose).
Outputs: cmd-<name>.md per command; exit 1 under -check when stale.
Constraints: never discards human prose. A page's PROSE blocks are read back and re-emitted verbatim; pages predating the markers have their Description, Examples and See Also sections migrated into blocks.