Skip to content

[codex] Alphabetize CLI help commands#2304

Draft
sm18lr88 wants to merge 1 commit into
rtk-ai:developfrom
sm18lr88:codex/alphabetize-cli-menu
Draft

[codex] Alphabetize CLI help commands#2304
sm18lr88 wants to merge 1 commit into
rtk-ai:developfrom
sm18lr88:codex/alphabetize-cli-menu

Conversation

@sm18lr88
Copy link
Copy Markdown

@sm18lr88 sm18lr88 commented Jun 7, 2026

What changed

  • Alphabetizes the top-level rtk --help command menu by assigning equal Clap display order to every user-facing top-level subcommand.
  • Adds a regression test that renders the long help and verifies non-built-in top-level commands are sorted alphabetically.

Why

The CLI help menu was emitted in enum definition order, which made the command list hard to scan as more wrappers were added. Clap sorts commands that share the same display order, so setting a shared display order keeps runtime dispatch unchanged while producing an organized menu.

Validation

  • cargo fmt --check
  • rtk cargo check
  • rtk cargo test test_top_level_help_commands_are_alphabetical
  • cargo run --quiet -- --help

Full rtk cargo test was also run and currently fails on Windows in core::stream tests because test commands such as Unix-style echo/cat/exit helpers are not found on PATH; unrelated tests passed (2050 passed; 16 failed; 7 ignored).

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


DeepWiki Dev seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants