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')