Promote status to the primary command over list and info
Hide `list` and `info` as aliases so existing scripts keep working while surfacing `status` as the canonical entry point in help output.
This commit is contained in:
parent
c12d60119f
commit
3328009af6
|
|
@ -53,17 +53,25 @@ program
|
||||||
// Apps
|
// Apps
|
||||||
|
|
||||||
program
|
program
|
||||||
.command('list')
|
.command('status')
|
||||||
.helpGroup('Apps:')
|
.helpGroup('Apps:')
|
||||||
.description('List all apps')
|
.description('Show status of all apps, or details for a specific app')
|
||||||
|
.argument('[name]', 'app name (uses current directory if omitted)')
|
||||||
|
.option('-t, --tools', 'show only tools')
|
||||||
|
.option('-a, --apps', 'show only apps (exclude tools)')
|
||||||
|
.action((name?: string, options?: { apps?: boolean; tools?: boolean }) => {
|
||||||
|
if (name) return infoApp(name)
|
||||||
|
return listApps(options ?? {})
|
||||||
|
})
|
||||||
|
|
||||||
|
program
|
||||||
|
.command('list', { hidden: true })
|
||||||
.option('-t, --tools', 'show only tools')
|
.option('-t, --tools', 'show only tools')
|
||||||
.option('-a, --apps', 'show only apps (exclude tools)')
|
.option('-a, --apps', 'show only apps (exclude tools)')
|
||||||
.action(listApps)
|
.action(listApps)
|
||||||
|
|
||||||
program
|
program
|
||||||
.command('info')
|
.command('info', { hidden: true })
|
||||||
.helpGroup('Apps:')
|
|
||||||
.description('Show info for an app')
|
|
||||||
.argument('[name]', 'app name (uses current directory if omitted)')
|
.argument('[name]', 'app name (uses current directory if omitted)')
|
||||||
.action(infoApp)
|
.action(infoApp)
|
||||||
|
|
||||||
|
|
@ -92,16 +100,6 @@ program
|
||||||
.argument('[name]', 'app name (uses current directory if omitted)')
|
.argument('[name]', 'app name (uses current directory if omitted)')
|
||||||
.action(openApp)
|
.action(openApp)
|
||||||
|
|
||||||
program
|
|
||||||
.command('status', { hidden: true })
|
|
||||||
.argument('[name]', 'app name')
|
|
||||||
.option('-t, --tools', 'show only tools')
|
|
||||||
.option('-a, --apps', 'show only apps (exclude tools)')
|
|
||||||
.action((name?: string, options?: { apps?: boolean; tools?: boolean }) => {
|
|
||||||
if (name) return infoApp(name)
|
|
||||||
return listApps(options ?? {})
|
|
||||||
})
|
|
||||||
|
|
||||||
program
|
program
|
||||||
.command('rename')
|
.command('rename')
|
||||||
.helpGroup('Apps:')
|
.helpGroup('Apps:')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user