Usage message [options] could be better placed
Metadata
Current evaluation
Resolved by snapcraft PR #1307 (commit d34dc16af), which replaced the docopt-based CLI with a Click-based UI and internal refactor.
Resolution: closed resolved
Reason: The issue links resolving PR #1307, merged as commit d34dc16af. That change removed docopt and refactored the CLI and help handling to use Click.
Evaluated by: mr-cal-bot
No scores available.
Issue body
I see this at the moment:
mark@mark-XPS-15-9550:~$ snapcraft reserve
Usage:
snapcraft [options] [--enable-geoip --no-parallel-build]
snapcraft [options] init
snapcraft [options] pull [<part> ...] [--enable-geoip]
snapcraft [options] build [<part> ...] [--no-parallel-build]
snapcraft [options] stage [<part> ...]
snapcraft [options] strip [<part> ...]
snapcraft [options] clean [<part> ...] [--step <step>]
snapcraft [options] snap [<directory> --output <snap-file>]
snapcraft [options] cleanbuild
snapcraft [options] login
snapcraft [options] logout
snapcraft [options] upload <snap-file>
snapcraft [options] list-plugins
snapcraft [options] help (topics | <plugin> | <topic>) [--devel]
snapcraft (-h | --help)
snapcraft --version
The successive [options] sections make this message much less readable. Can we drop the [options] piece up front and put explicit lists of options behind the commands, or alternatively, just document each command options in the specific help for the specific command?
In the end I would like to see:
mark@mark-XPS-15-9550:~$ snapcraft reserve
Usage:
snapcraft [--enable-geoip --no-parallel-build]
snapcraft init
snapcraft pull [<part> ...] [--enable-geoip]
snapcraft build [<part> ...] [--no-parallel-build]
snapcraft stage [<part> ...]
snapcraft strip [<part> ...]
snapcraft clean [<part> ...] [--step <step>]
snapcraft snap [<directory> --output <snap-file>]
snapcraft cleanbuild
snapcraft login
snapcraft logout
snapcraft upload <snap-file>
snapcraft list-plugins
snapcraft help (topics | <plugin> | <topic>) [--devel]
snapcraft (-h | --help)
snapcraft --version
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Resolved by snapcraft PR #1307 (commit d34dc16af), which replaced the docopt-based CLI with a Click-based UI and internal refactor. | |
| stealth/space-bunny-alpha | — | closed resolved | Snapcraft's repetitive `[options]` usage text was reworked in PR #1307, resolving the command-help readability concern. | |
| stealth/space-bunny-alpha | — | closed resolved | Resolved by merged PR canonical/snapcraft#1307 (commit d34dc16af), which replaced docopt with Click and redesigned the CLI help output. | |
| stealth/space-bunny-alpha | — | closed stale | Proposed removing repeated [options] prefixes from CLI usage; closed as stale without implementing the reformatting. | |
| qwen/qwen3.6-35b-a3b | — | — | The proposed CLI usage message reformatting was closed without implementation. The suggestion to move repeated [options] prefixes to the end of command lines was abandoned due to inactivity. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. The suggestion to restructure the CLI usage message by moving repeated options to individual commands was abandoned, likely superseded by later interface updates. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
snapcore/snapcraft#1307
(confidence 99%)
Merged commit d34dc16af replaced the docopt-based interface cited in the issue.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1582506 --help needs some love | snapcraft (launchpad) | closed | Resolved by snapcore/snapcraft#1307 (commit d34dc16af), replacing docopt with Click and adding clearer per-subcommand help and option summaries. |