-
-
Notifications
You must be signed in to change notification settings - Fork 531
Open
Description
Problem
Most CLI frameworks (Cobra, commander.js, git) automatically provide a help subcommand (e.g. mycli help subcmd) in addition to the --help flag. Currently @effect/cli only supports --help/-h flags.
The help subcommand pattern is valuable because:
- Unambiguous —
tool help Xis always a read-only help request. With flags,--helpcan be consumed as a value by a preceding option (e.g.tool commit -m --helpmight create a commit with message "--help" depending on the parser). - POSIX/GNU convention — users expect
tool helpto work. - Tooling-friendly — command authorization systems (e.g. proxies that allow/deny CLI operations) can trivially distinguish
help ...as read-only without parsing flags, which is harder with--helpembedded anywhere in the argument list.
Requested behavior
mycli help— shows top-level help (equivalent tomycli --help)mycli help subcmd— shows subcommand help (equivalent tomycli subcmd --help)mycli help nonexistent— shows an error listing available commands
Created on behalf of @schickling
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels