From b18163c57b59cabbd7d18165b28933155d94d74a Mon Sep 17 00:00:00 2001 From: kaitranntt Date: Thu, 4 Dec 2025 03:23:43 -0500 Subject: [PATCH] fix(update): add --help support and --dev alias for update command --- src/ccs.ts | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/ccs.ts b/src/ccs.ts index 23d439d8..3846d23b 100644 --- a/src/ccs.ts +++ b/src/ccs.ts @@ -241,8 +241,27 @@ async function main(): Promise { // Special case: update command if (firstArg === 'update' || firstArg === '--update') { const updateArgs = args.slice(1); + + // Handle --help for update command + if (updateArgs.includes('--help') || updateArgs.includes('-h')) { + console.log(''); + console.log('Usage: ccs update [options]'); + console.log(''); + console.log('Options:'); + console.log(' --force Force reinstall current version'); + console.log(' --beta, --dev Install from dev channel (unstable)'); + console.log(' --help, -h Show this help message'); + console.log(''); + console.log('Examples:'); + console.log(' ccs update Update to latest stable'); + console.log(' ccs update --force Force reinstall'); + console.log(' ccs update --beta Install dev channel'); + console.log(''); + return; + } + const forceFlag = updateArgs.includes('--force'); - const betaFlag = updateArgs.includes('--beta'); + const betaFlag = updateArgs.includes('--beta') || updateArgs.includes('--dev'); await handleUpdateCommand({ force: forceFlag, beta: betaFlag }); return; }