docs(tpagectl): add comprehensive documentation #608
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
thwap/thwap-pagesd!608
Loading…
Reference in a new issue
No description provided.
Delete branch "docs/tpagectl-documentation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Implements Phase 8 comprehensive documentation (roadmap #280).
internal/tpagectl/docs— a documentation generator that walks the urfave/cli command tree and renders, per command, its usage line,ArgsUsage, description, options (with defaults), and subcommands. The auto-injectedhelpflag/subcommand are excluded. Outputs:MarkdownTree(e.g.docs/commands/tpagectl-site-create.md)..1page per command viaManTree, with proper.TH/.SHstructure and roff escaping.tpagectl docscommand —tpagectl docs markdown DIRandtpagectl docs man DIRregenerate the docs (--helpto man/markdown).cmd/tpagectl/README.mdcovering installation, configuration (file search order,TPAGECTL_*env, precedence), authentication (login,token set/clear, keychain), TLS controls, interactive mode, output formats, exit codes, and examples for every command group, linking to the generated docs.docs/commands/and 31 man pages underdocs/man/.Why
Roadmap task #280, the first item in Phase 8.
Testing
docsunit tests: synthetic command tree →Markdown/ManPageinclude usage, flags, subcommands, and section headers;MarkdownTree/ManTreewrite full-path filenames (e.g.tpagectl-site-create.md,tpagectl.1)site createpage and man page render usage/options/subcommands)go test -race ./...passes (29 packages)golangci-lint runcleanBreaking Changes
None. A hidden
docscommand is added; normal help output is unchanged.Notes
urfave/cli v3 ships no
ToMan/ToMarkdown(unlike v2), so generation is implemented here using the v3Flag/DocGenerationFlaginterfaces.Closes #277
Closes #278
Closes #279
Closes #280
Comprehensive and accurate documentation system. The generator walks the urfave/cli tree correctly, excludes the auto-injected
helpcommand/flag, renders proper Markdown tables and.TH/.SHman structure with roff escaping, and the hiddendocscommand wires up cleanly. The README is thorough and verified accurate against the code (config precedence, env vars, TLS, exit codes, status exit 0/1). Approving; one generator defect filed.Suggestions
internal/tpagectl/docs/docs.go:111,159– Leaf commands render an empty## Subcommands/.SH COMMANDSsection because urfave auto-injects ahelpsubcommand into every command at setup:len(cmd.Commands) > 0is always true, but the loop skipshelp. Confirmed in the committed docs (e.g.docs/commands/tpagectl-site-create.mdends with a bare## Subcommands;docs/man/tpagectl-site-create.1has an empty.SH COMMANDS). Filter outhelpbefore checking the length. Filed as #609.Notes
docscommand appears in the root page's Subcommands list and gets its own doc pages — hidden commands arguably shouldn't be in user-facing docs..SH NAMEuses the space-separated full path (tpagectl site create \- ...);man -k/aproposparsing expects a single-token name first..THdate is hardcoded to"2026".go:generateguard.Praise
DocGenerationFlagusage for usage text and defaults..TH/.SH/.TPstructure and consistent roff escaping of-/./\.