improve: redesign CLI reference flag rendering#2999
Merged
bartlomieju merged 4 commits intomainfrom Mar 30, 2026
Merged
Conversation
Redesign the auto-generated CLI flags section to be more scannable and informative: - Render each flag as a bordered card instead of a bare h3 heading - Show short flags inline with long flags (e.g. `--config, -c`) - Parse the `usage` field to extract and display value types (e.g. `<FILE>`, `<DIR>`, `<N>`) - Mark optional values with an "optional" tag - Group flags with consistent spacing - Use smaller text for descriptions to keep cards compact Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
josh-collinsworth
approved these changes
Mar 27, 2026
Contributor
josh-collinsworth
left a comment
There was a problem hiding this comment.
Approved, with a couple of comments:
-
I actually don't know that you need the cards. I think the typography changes alone do a lot for scannability. Adding the card lines might just clutter up the page. (If it seems like items need to be separated more, maybe just try more space?) But if you try it and it still seems like cards are the best approach, I'm fine with it.
-
I'm a little concerned this will have a long tail of side effects; we'll want to monitor and closely look through the reference pages at various screen sizes and in both light and dark mode to be safe.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Member
Author
|
Thanks, I did remove the card style |
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.
Summary
<h3>headings into bordered cards for better scannability--config, -cinstead of separate "Short flag" text)usagefield fromjson_referenceto extract and display value types (<FILE>,<DIR>,<N>) alongside the flag name--fail-fast[=<N>]Before:

After:
