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()), });