-
Notifications
You must be signed in to change notification settings - Fork 340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrite CLI using better options parser (possibly yargs) #311
Comments
I'm not too familiar with the CLI args parsers, what does sub-command support mean in this context? I guess knowing that will probably explain the need to switch away from |
@Menardi I'm thinking of something like this: https://github.com/yargs/yargs/blob/master/docs/advanced.md#example-command-hierarchy-using-commanddir I will try to provide a Motivation section to this issue when I find the time. |
If you wonder what Cordova might look like using Commander for the CLI, I tried emulating the Cordova CLI to try out some new features coming in Commander v5: (This isn't a recommendation to use Commander, just commenting for your possible interest.) |
Hi! Browsing through other cli-libraries I bumped into this issue. I have been building a cli-parser myself (for educational purposes) and reading this issue's descriptions, seems it might be a good fit: https://github.com/carloscortonc/cli-er#readme Would love any feedback/suggestions! 👐 |
Requirements
AFAICT,
nopt
does not satisfy any of those, so let's look at some alternatives.Disqualifications
meow
andoptionator
have no sub-command support: Support subcommands sindresorhus/meow#69, Git style commands gkz/optionator#6optimist
andminimist
are not maintained anymore: https://github.com/substack/node-optimist/issues/132, https://github.com/substack/minimist/issues/115That leaves us with
yargs
vscommander
. Multiple reasons let me favoryargs
:Related: #309
The text was updated successfully, but these errors were encountered: