From 173ed57d2c77661b2198e4d0c78df88210641459 Mon Sep 17 00:00:00 2001 From: Lukas May Date: Sat, 31 Jan 2026 19:20:38 +0100 Subject: [PATCH] feat(cli): add initiative phases command Add cw initiative phases to list phases for an initiative. Displays phase number, name, status, and description. --- src/cli/index.ts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/cli/index.ts b/src/cli/index.ts index a3840aa..b48400f 100644 --- a/src/cli/index.ts +++ b/src/cli/index.ts @@ -723,6 +723,30 @@ export function createCli(serverHandler?: (port?: number) => Promise): Com } }); + // cw initiative phases + initiativeCommand + .command('phases ') + .description('List phases for an initiative') + .action(async (initiativeId: string) => { + try { + const client = createDefaultTrpcClient(); + const phases = await client.listPhases.query({ initiativeId }); + if (phases.length === 0) { + console.log('No phases found'); + return; + } + for (const phase of phases) { + console.log(`${phase.number.toString().padStart(2)}. ${phase.name} [${phase.status}]`); + if (phase.description) { + console.log(` ${phase.description}`); + } + } + } catch (error) { + console.error('Failed to list phases:', (error as Error).message); + process.exit(1); + } + }); + // Architect command group const architectCommand = program .command('architect')