I took some time to study some cli npm packages. We did many hacks and tricks to adopt commander.js and I think we should move to yargs (https://github.com/yargs/yargs). It seems promising and it is quite active.
- It has support for sub commands
- We can have one file for each command or sub-command
- it has support for alias
- It has not native support
yarn help, but it has native support for
- For some command we still can’t force some flags (like we do for the global commands), but maybe we can resolved this with https://github.com/yargs/yargs#coerce.
Do someone see any other reasons why we should not move to this? Please let me know 🙂