prog
.command('foo')
.describe('Top level command')
.alias('f')
.action(() => console.log('see `app foo --help`'))
prog
.command('foo bar')
.describe('A subcommand')
.action(() => console.log('did a thing'))
prog
.command('foo baz <a>')
.describe('Another subcommand')
.action((a) => console.log('did another thing', a))
Given the above, each of the following should work:
prog foo
prog foo bar
prog foo baz 1
prog f
prog f bar
prog f baz 1
Given the above, each of the following should work:
prog fooprog foo barprog foo baz 1prog fprog f barprog f baz 1