docs: generate the CLI flag reference from the argument declarations - #458
Merged
Merged
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (12)
📝 WalkthroughWalkthroughThe CLI argument schemas now generate Markdown reference tables for English and Japanese documentation. A build-only registry supplies the schemas, rendering helpers update marked blocks, and tests detect documentation drift and language mismatches. ChangesCLI reference generation
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Registry as gunshi-registry
participant Generator as gen-cli-reference.mjs
participant Renderer as cli-reference.mjs
participant Docs as CLI documentation
Registry-->>Generator: ROOT_ARGS and INSTALL_ARGS
Generator->>Renderer: Render argument schemas
Renderer-->>Generator: Markdown reference tables
Generator->>Docs: Replace generated blocks
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
gunshi adoption item 4 (per the approved utilization plan): the docs site's CLI flag reference is now generated from the same
define()arg declarations that drive parsing,--help, and shell completion — closing the last hand-maintained home of the flag-drift class.Shape (investigation-driven)
Only the pages that actually had enumerated per-flag documentation get generated tables:
guides/(setup)/cli.md(root analyzer) andguides/(setup)/install.md(install), en+ja, injected between<!-- cli-reference:start/end -->markers ahead of the untouched hand-written per-flag prose sections. Surfaces documented only informally (ci, docs/explain mentions) were deliberately not given generated pages nobody had. Rendered as real Markdown tables directly from theArgSchemaconsts rather thangenerate()'s terminal-formatted block — per @gunshi/docs' own man-page-generation guidance for non-terminal targets — confirmed rendering as proper<table>s in Blume's built HTML.Mechanics (the established committed-generated pattern, third sibling to gen:docs/gen:rules-index)
gen:cli-referencescript imports the declarations through a new tree-shaken, unexported dist entry (385 bytes;check:publishall green — no public-surface change).No changeset — docs-site content plus internal generator/test only; zero runtime or public-export change. Gates: full suite (2,711 tests), lint, e2e, smoke, check:publish, and the docs build (183 pages) all green.
🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
Tests