From 203e3804b3ca6aa0cd1a55cb79b05a7d5e6b9646 Mon Sep 17 00:00:00 2001 From: Soumyadeep Ghosh Date: Wed, 4 Feb 2026 10:50:14 +0530 Subject: [PATCH] CLI: sort commands alphabetically in help output Fixes #7964 Added sortSubcommands: true to configureHelp() to display commands in alphabetical order when running 'openclaw --help'. --- src/cli/program/help.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cli/program/help.ts b/src/cli/program/help.ts index 17b041e2d..2d9203154 100644 --- a/src/cli/program/help.ts +++ b/src/cli/program/help.ts @@ -47,6 +47,9 @@ export function configureProgramHelp(program: Command, ctx: ProgramContext) { program.option("--no-color", "Disable ANSI colors", false); program.configureHelp({ + // sort options and subcommands alphabetically + sortSubcommands: true, + sortOptions: true, optionTerm: (option) => theme.option(option.flags), subcommandTerm: (cmd) => theme.command(cmd.name()), });