Skip to content

docs: add cloud cli command reference#979

Closed
lennessyy wants to merge 7 commits intomainfrom
docs/cloud-command-reference-split
Closed

docs: add cloud cli command reference#979
lennessyy wants to merge 7 commits intomainfrom
docs/cloud-command-reference-split

Conversation

@lennessyy
Copy link
Copy Markdown
Contributor

@lennessyy lennessyy commented Apr 14, 2026

Summary

  • Adds the cloud CLI command.yml file to input to add cloud command reference to docs generation.
  • Adds a -split flag to gen-docs that specifies command names whose subcommands should each get their own documentation file in a subdirectory, rather than all being combined into a single .mdx file
  • When a command is split (e.g., -split cloud), its direct children each become a separate file in a subdirectory: cloud/namespace.mdx, cloud/user.mdx, cloud/apikey.mdx, etc.
  • Existing non-split commands (workflow, activity, operator, etc.) are completely unaffected
  • Also fixes the encodeJSONExample regex to catch standalone JSON objects in single quotes (e.g., '{"key":"value"}'), not just key=value patterns

Context

The Temporal Cloud CLI extension has ~130 commands across 10 top-level groups. Without this change, gen-docs would produce a single cloud.mdx file that's roughly 2800 lines. With this change, each command group gets a manageable page (the largest being cloud/namespace.mdx at ~1150 lines, comparable to workflow.mdx).

Usage

No changes are needed in the cloud-cli repo. The -split flag is passed by the documentation repo's workflow:

go run ./cmd/gen-docs \
  -input internal/temporalcli/commands.yaml \
  -input path/to/cloud-cli/commands.yml \
  -split cloud \
  -output dist/docs

The flag can be specified multiple times if needed in the future.

Test plan

  • Verified CLI-only generation produces identical flat output (no regressions)
  • Verified -split cloud produces cloud/ subdirectory with correct file splits
  • Verified generated content (frontmatter, headings, flag tables, global flags) renders correctly
  • Verified JSON-in-tables MDX rendering fix works
  • CI checks pass

🤖 Generated with Claude Code

@lennessyy lennessyy requested a review from a team as a code owner April 14, 2026 00:05
@lennessyy lennessyy marked this pull request as draft April 14, 2026 00:12
@lennessyy lennessyy changed the title feat: support subdirectory splitting for grouped command docs docs: support subdirectory splitting for grouped command docs Apr 14, 2026
@lennessyy lennessyy force-pushed the docs/cloud-command-reference-split branch from 121ee02 to 3959b17 Compare April 14, 2026 00:16
@lennessyy lennessyy changed the title docs: support subdirectory splitting for grouped command docs docs: add cloud cli command reference Apr 14, 2026
@lennessyy lennessyy force-pushed the docs/cloud-command-reference-split branch from 00c7382 to 622fd00 Compare April 14, 2026 00:35
Add a `-split` flag to gen-docs that specifies command names whose
subcommands should each get their own file in a subdirectory rather than
all being combined into a single file. This is needed for the cloud CLI
extension, which has ~130 commands that would produce an unmanageably
large single page.

Usage:

  go run ./cmd/gen-docs \
    -input internal/temporalcli/commands.yaml \
    -input path/to/cloud-cli/commands.yml \
    -split cloud \
    -output dist/docs

This produces cloud/namespace.mdx, cloud/user.mdx, cloud/apikey.mdx,
etc. alongside the existing flat files. Existing non-split commands
are unaffected.

Also fixes the encodeJSONExample regex to catch standalone JSON objects
in single quotes (e.g., '{"key":"value"}'), not just key=value patterns.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@lennessyy lennessyy force-pushed the docs/cloud-command-reference-split branch from 0562f8c to 3cfd1f2 Compare April 14, 2026 00:41
@lennessyy lennessyy closed this Apr 14, 2026
@lennessyy lennessyy deleted the docs/cloud-command-reference-split branch April 14, 2026 00:44
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