Skip to content

Add gen-docs tool for reference documentation#499

Open
lennessyy wants to merge 1 commit into
mainfrom
add-gen-docs-tool
Open

Add gen-docs tool for reference documentation#499
lennessyy wants to merge 1 commit into
mainfrom
add-gen-docs-tool

Conversation

@lennessyy

Copy link
Copy Markdown

Summary

Add a cmd/gen-docs tool that generates MDX reference documentation pages by walking the urfave/cli command tree.

  • Constructs all commands via existing New*Command constructors (with nil client functions, which are safe since clients are only used at runtime)
  • Generates one MDX page per top-level command plus an index page
  • Matches the existing documentation format used on https://docs.temporal.io/cloud/tcld
  • Escapes angle brackets and curly braces in flag usage text for MDX compatibility

Usage

go run ./cmd/gen-docs -output dist/docs

Companion PR

Test plan

  • go build ./cmd/gen-docs/ compiles
  • go run ./cmd/gen-docs -output dist/docs generates 16 files (15 commands + index)
  • Generated pages render correctly on the docs site (verified via companion PR)

Walks the urfave/cli command tree to generate MDX reference pages for
each tcld command. Outputs one page per top-level command plus an
index page. Escapes angle brackets and curly braces for MDX
compatibility.

Usage:
  go run ./cmd/gen-docs -output <dir>
@lennessyy lennessyy requested a review from a team as a code owner June 26, 2026 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant