feat(mosaic): alphabetize and group mosaic --help output #402

Merged
jason.woltje merged 1 commits from feat/mosaic-help-alphabetize into main 2026-04-05 05:12:33 +00:00
3 changed files with 23 additions and 2 deletions
Showing only changes of commit 09777e5ef7 - Show all commits

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,