Rewrite CLI using better options parser (possibly yargs)
- Dominant language
- JavaScript
- Stars
- 967
- Forks
- 344
- Avg merge
- 8h 41m
- Merged PRs (30d)
- 9
Description
### Requirements
- sub-command support
- generate usage text from specification
AFAICT, `nopt` does not satisfy any of those, so let's look at [some alternatives](https://www.npmtrends.com/minimist-vs-optimist-vs-yargs-vs-commander-vs-optionator-vs-nopt-vs-meow).
### Disqualifications
- `meow` and `optionator` have no sub-command support: https://github.com/sindresorhus/meow/issues/69, https://github.com/gkz/optionator/issues/6
- `optimist` and `minimist` are not maintained anymore: https://github.com/substack/node-optimist/issues/132, https://github.com/substack/minimist/issues/115
That leaves us with [`yargs` vs `commander`](https://www.npmtrends.com/yargs-vs-commander). Multiple reasons let me favor `yargs`:
- Seemingly better docs
- Faster growing download count (= popularity?)
- Younger project
- The pirate theme :wink:
Related: #309
Contributor guide
Research direction
Start by reviewing how the CLI currently uses nopt and read related issue #309. Compare yargs and commander against the stated requirements, especially sub-command support and generating usage text from a specification. The work is done when the CLI uses a suitable parser and satisfies both requirements.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100