Compare commits

...

1 Commits

Author SHA1 Message Date
Jarvis
09777e5ef7 feat(mosaic): alphabetize and group mosaic --help output
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
Enables sortSubcommands on the root program, sessions group, gateway
group, and mission group so all subcommand listings render A-Z. Appends
a Command Groups section via addHelpText to group commands by role
(Runtime, Gateway, Framework, Platform, Runtimes).

Implements CU-04-01, CU-04-02, CU-04-03 from mission cli-unification-20260404.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-05 00:08:15 -05:00
3 changed files with 23 additions and 2 deletions

View File

@@ -33,7 +33,23 @@ try {
const program = new Command();
program.name('mosaic').description('Mosaic Stack CLI').version(CLI_VERSION);
program
.name('mosaic')
.description('Mosaic Stack CLI')
.version(CLI_VERSION)
.configureHelp({ sortSubcommands: true })
.addHelpText(
'after',
`
Command Groups:
Runtime: tui, login, sessions
Gateway: gateway
Framework: agent, bootstrap, coord, doctor, init, launch, mission, prdy, seq, sync, upgrade, wizard, yolo
Platform: update
Runtimes: claude, codex, opencode, pi
`,
);
// ─── runtime launchers + framework commands ────────────────────────────
@@ -214,7 +230,10 @@ program
// ─── sessions ───────────────────────────────────────────────────────────
const sessionsCmd = program.command('sessions').description('Manage active agent sessions');
const sessionsCmd = program
.command('sessions')
.description('Manage active agent sessions')
.configureHelp({ sortSubcommands: true });
sessionsCmd
.command('list')

View File

@@ -30,6 +30,7 @@ export function registerGatewayCommand(program: Command): void {
.option('-h, --host <host>', 'Gateway host', 'localhost')
.option('-p, --port <port>', 'Gateway port', '14242')
.option('-t, --token <token>', 'Admin API token')
.configureHelp({ sortSubcommands: true })
.action(() => {
gw.outputHelp();
});

View File

@@ -47,6 +47,7 @@ export function registerMissionCommand(program: Command) {
.option('--update <idOrName>', 'Update a mission')
.option('--project <idOrName>', 'Scope to project')
.argument('[id]', 'Show mission detail by ID')
.configureHelp({ sortSubcommands: true })
.action(
async (
id: string | undefined,