Skip to content

Add CLI flags reference and auto-generation script#3179

Open
anegg0 wants to merge 3 commits intonitro-cli-guidefrom
nitro-cli/cli-flags-reference
Open

Add CLI flags reference and auto-generation script#3179
anegg0 wants to merge 3 commits intonitro-cli-guidefrom
nitro-cli/cli-flags-reference

Conversation

@anegg0
Copy link
Copy Markdown
Contributor

@anegg0 anegg0 commented Mar 26, 2026

Summary

  • New auto-generated reference page with 634 CLI flags across 23 namespaces
  • New TypeScript script (scripts/generate-cli-reference.ts) that generates the MDX from structured JSON data
  • JSON data source extracted from the community Helm chart README
  • Sidebar entries for all 5 Nitro CLI guide pages
  • package.json script entry: yarn generate-cli-reference

How the auto-generation works

  1. scripts/data/nitro-cli-flags.json contains 634 flags with type, default, and description
  2. scripts/generate-cli-reference.ts reads the JSON, groups by namespace, generates MDX with collapsible sections
  3. Run yarn generate-cli-reference to regenerate
  4. Run yarn generate-cli-reference --check in CI to verify the committed file matches

Content gap tracking

  • TW-693: Nitro CLI reference (primary deliverable)

Test plan

  • yarn generate-cli-reference --check passes
  • Page renders correctly at /run-arbitrum-node/nitro/cli-flags-reference
  • All 23 namespace sections are collapsible
  • yarn build passes with all sidebar entries (requires all other PRs merged first)
  • yarn lint:markdown passes

Part of #3174 — merge this last (contains sidebar entries referencing all other pages)

anegg0 added 2 commits March 26, 2026 16:40
Introduce scripts/generate-cli-reference.ts that reads structured flag data
from scripts/data/nitro-cli-flags.json (634 flags across 23 namespaces) and
generates docs/run-arbitrum-node/nitro/cli-flags-reference.mdx with collapsible
namespace sections, type/default columns, and cross-links to curated guides.

Add all 5 Nitro CLI guide pages to sidebars.js and the generate-cli-reference
script entry to package.json.
Run Prettier on generated output before comparing with the committed
file, since Prettier reformats table padding, asterisk escaping, and
column widths in markdown tables.
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
arbitrum-docs Error Error Mar 27, 2026 0:04am

Request Review

Curly braces in flag descriptions and defaults were being parsed as
JSX expressions by MDX. Added escaping in the generation script and
regenerated the output.
@anegg0 anegg0 added slop starter Generated draft to start from and removed slop starter Generated draft to start from labels Mar 27, 2026
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