Support command-level help in forge #39
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
forge --helpworks, but command-level help does not. Examples such as:currently flow into the command-specific parsers and fail as unknown options or missing positional arguments. This differs from
gh, where subcommands commonly support--help, and it makes the CLI harder to discover when users or agents know the command family but not its exact flags.Proposed behavior
Support
-h/--helpafter the resource and command. At minimum, print useful command-specific usage for the commands that parse flags:forge issue create --helpforge issue edit --helpforge issue close --helpforge pr create --helpforge pr edit --helpforge pr comment --helpforge pr reply --helpIt is fine if read-only commands initially print the relevant top-level usage section, as long as they exit successfully and do not attempt API calls.
Acceptance sketch
forge --helpbehavior remains unchanged.-h/--helpexits zero and performs no API call.