I'm coming from commander
, which autogenerates documentation on flags, and was surprised to see that meow
's autoHelp
feature doesn't do the same.
// in index.js
const cli = require('meow')({
flags: {
'initial-indent': {
type: 'string',
alias: 'n',
description: 'Initial indentation level'
default: '0'
},
indent: {
type: 'string',
alias: 'i',
description: 'YAML indentation level'
default: '2'
}
}
})
cli.showHelp()
should generate output something like
$ ./index.js
My cool tool description
Options:
-n, --initial-indent [value] Initial indentation spaces. Optional; default 0.
-i, --indent [value] YAML indentation spaces. Optional; default 2.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too