From b50cbe8a4c7a0969fd94d997430a593b736f35d9 Mon Sep 17 00:00:00 2001 From: Melvin Chia Date: Tue, 30 Dec 2025 21:01:50 +0800 Subject: [PATCH] fix(forgeCLI): enhance command usage output with colored options and commands --- tools/forgeCLI/src/cli/help.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/forgeCLI/src/cli/help.ts b/tools/forgeCLI/src/cli/help.ts index c5f278c72..aca7211a3 100644 --- a/tools/forgeCLI/src/cli/help.ts +++ b/tools/forgeCLI/src/cli/help.ts @@ -62,9 +62,13 @@ export function configureHelp(program: Command): void { // Usage output.push(formatSectionTitle('Usage')) - const usage = helper.commandUsage(cmd) + const usage = helper + .commandUsage(cmd) + .replace(/\bforge\b/, chalk.magenta('forge')) + .replace(/\[options\]/g, chalk.green('[options]')) + .replace(/\[command\]/g, chalk.cyan('[command]')) - output.push(` ${chalk.dim('$')} ${chalk.white(usage)}`) + output.push(` ${chalk.dim('$')} ${usage}`) // Description for subcommands if (cmd.parent && cmd.description()) {