← Back to issue list

Allow the application to choose the order of commands within a command group

View original Github issue

Metadata

Project
craft-cli
Number
#195
Type
issue
State
closed
Author
lengau
Labels
—
Created
Updated
Closed

Current evaluation

Implemented via merged PR #196 (commit a88b353): added CommandGroup.ordered flag so apps can keep declared command order in help output instead of alphabetising; issue closed as resolved.

Resolution: closed resolved

Reason: PR #196 'feat: allow the application to choose the help order of commands' was merged into main as commit a88b353, adding a CommandGroup.ordered field (craft_cli/dispatcher.py) and corresponding conditional sorting in craft_cli/helptexts.py, with unit tests in tests/unit/test_help.py.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### What needs to get done Provide a command group configuration that keeps the order of the command names in the created group rather than alphabetising them. ### Why it needs to get done For most command groups, alphabetical by command name is completely sensible. However, some command groups, such as lifecycle commands, have a distinct order. In these cases, we should be able to retain the order.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Implemented via merged PR #196 (commit a88b353): added CommandGroup.ordered flag so apps can keep declared command order in help output instead of alphabetising; issue closed as resolved.
stealth/space-bunny-alpha — closed stale Command-order configurability was closed without a documented fix, PR, or commit; no comments followed and activity stopped 1066 days ago.
qwen/qwen3.6-35b-a3b — — Closed without implementation. The request to preserve command group insertion order instead of alphabetical sorting was abandoned after 1050 days with no comments or resolution.
qwen/qwen3.6-35b-a3b — — Request to preserve command group order instead of alphabetizing was closed without implementation or discussion. No pull request or resolution was provided, indicating the feature was abandoned.
qwen/qwen3.6-35b-a3b — — Closed without implementation. The request to allow configurable command group ordering was abandoned due to inactivity. No resolution or merge details were provided.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/craft-cli#196 (confidence 98%)

    Merged PR implementing the requested command-group ordering configuration.

Related issues

Issue Project State Summary Similarity
#196 feat: allow the application to choose the help order of commands craft-cli merged Merged PR #196 as commit a88b353, adding application-configurable command help order and fixing #195.
76%
#574 feat: add ordered to the add_command_group API craft-application merged PR #574 by dariuszd21 was merged as commit 46ee5405, adding an `ordered` keyword argument to Application.add_command_group so command ordering in help output can be persisted; approved with 2 reviewers.
73%