← Back to issue list

The help produced for a command options should give more information

View original Github issue

Metadata

Project
craft-cli
Number
#132
Type
issue
State
open
Author
facundobatista
Labels
Created
Updated
Closed

Current evaluation

Feature request to enrich command option help output to indicate whether an option expects a value, has a default, is repeatable, or has choices, similar to argparse. Open since 2021 with no comments, labels, or assignee; help rendering code still only shows option strings and help text.

Suggested action: needs triage

Reason: The issue is a well-scoped feature request from a maintainer (facundobatista) asking to define and implement a way to express option metadata (value vs flag, default, repeatable, choices) in help output. It has no labels, no comments, no assignee, and no maintainer response, so it has not been triaged. The current code in dispatcher.py (lines 395-407) still only appends (option_strings, help_text) tuples without any of the requested metadata, confirming the feature is unimplemented. Related help improvements (PRs #109, #111, #113, #271, #298, #306) addressed formatting and markdown but not this specific metadata display.

Impact: 35 Quick Win: 15.75 Staleness: 85 Complexity: 55 Confidence: 70 Support Request: 10

Issue body

Currently each option information for a command only states the option and the help message; see this output for a fake command as it's produced right now: ``` --name: Example of a parameter that expects one value --rank: Expects a value, but has a default -c, --confirm: This option just puts a flag in True -s, --stars: There may be one or more stars --planets: There may be zero or more planets --profile: Option that has choices ``` However, the `argparse` module shows more information: ``` --name NAME Example of a parameter that expects one value --rank RANK Expects a value, but has a default -c, --confirm This option just puts a flag in True -s [STARS], --stars [STARS] There may be one or more stars --planets [PLANETS ...] There may be zero or more planets --profile {simple,kubernetes,machine} Option that has choices ``` While I don't like the argparse output (at all), we could find a way to express that each parameter... - expects a value and it's not just a flag - has a default - may be used more than once (but at least one may be needed) - has some choices to select from Note that some of these combinations may happen (e.g. the command has choices and also a default). We need to define a way to express this information (or at least part of it) in a nice way, and then implement it.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 35
Quick Win: 15.75
Staleness: 85
Complexity: 55
Confidence: 70
Support Request: 10
needs triage Feature request to enrich command option help output to indicate whether an option expects a value, has a default, is repeatable, or has choices, similar to argparse. Open since 2021 with no comments, labels, or assignee; help rendering code still only shows option strings and help text.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 45
Confidence: 90
Support Request: 10
close stale Feature request to enhance CLI command option help output with details like defaults, choices, and repetition. Open for over 3.5 years with zero comments or maintainer engagement.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 60
Confidence: 80
Support Request: 10
close stale Proposal to enhance CLI help output by displaying option metadata like defaults, multiplicities, and choices. Untriaged, inactive for over 3 years with no maintainer engagement or implementation progress.
qwen3.6-35b-a3b-mtp-q6
Staleness: 90
Complexity: 40
Confidence: 85
Support Request: 10
needs triage Enhance command help output to show option metadata like value expectations, defaults, repetition, and choices. Open, inactive, and unassigned. Requires design specification and implementation.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/craft-cli#109 (confidence 60%)

    PR 'requested-help-improvements' addressed earlier help formatting improvements but not the option metadata display requested here.

  • Related To: canonical/craft-cli#111 (confidence 55%)

    PR 'help-markdown' added markdown help format; related to help output but not this specific feature.

  • Related To: canonical/craft-cli#113 (confidence 55%)

    PR 'help-markdown-options-table' improved options table rendering in markdown help; related to help output formatting.

Related issues

No related issues found above the similarity threshold.