Built-in help/version flags are not shown in usage output
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 58
- PR merge metrics
- No merged PRs in 30d
Description
Describe the feature
I'm using Citty's built-in -h/--help and -v/--version, but they don't show up in the usage output at all. Users have no way to discover them unless they already know the flags exist.
Current workarounds both lose the built-in behavior:
- declare them as args (have to reimplement help/version)
- write a fully custom
showUsage(lose renderUsage entirely).
Since the built-in flags are injected at the runMain level, an option on runMainOptions to show them in the usage output could be a fix. Happy to help if the idea
Additional information
- Would you be willing to help implement this feature?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the runMain entry point and inspect how runMainOptions injects the built-in -h/--help and -v/--version flags before usage is rendered. Trace renderUsage and add an option that includes those built-ins in the usage output while preserving their existing behavior; done when both flags are discoverable without custom argument declarations or showUsage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100