prog
.command('foo')
.describe('Top level command')
.action(() => console.log('see `app foo --help`'))
prog
.command('foo bar')
.describe('A subcommand')
.action(() => console.log('did a thing'))
Use case: the foo command doesn't do anything and requires usage of subcommands. As it is, doing app foo --help does not display any possible subcommands under the "Usage" section. Instead, one has to do app --help to see a potentially long list of available commands and subcommands. Ideally, app --help would show the foo command but not the foo bar command so that one would have to do app foo --help to see the available subcommands.
Side request: foo could do something, but it'd just be an alias of a required subcommand.
Use case: the
foocommand doesn't do anything and requires usage of subcommands. As it is, doingapp foo --helpdoes not display any possible subcommands under the "Usage" section. Instead, one has to doapp --helpto see a potentially long list of available commands and subcommands. Ideally,app --helpwould show thefoocommand but not thefoo barcommand so that one would have to doapp foo --helpto see the available subcommands.Side request:
foocould do something, but it'd just be an alias of a required subcommand.