How are they different?
Here we compare between commander, minimist, nomnom, optimist and yargs. In this comparison we will focus on the latest versions of those packages. The current versions are commander 2.9.0, minimist 1.2.0, nomnom 1.8.1, optimist 0.6.1 and yargs 6.6.0.
the complete solution for node.js command-line programs.
It was authored
on Aug, 2011.
minimist, parse argument options. It was authored by James Halliday on Jun, 2013.
nomnom, Option parser with generated usage and commands. It was authored by Heather Arthur on Apr, 2011.
optimist, Light-weight option parsing with an argv hash. No optstrings attached. It was authored by James Halliday on Dec, 2010.
yargs, yargs the modern, pirate-themed, successor to optimist. It was authored on Nov, 2013.
When comparing those packages you notice that
commander is the more popular package today
Stars on Github).
commander has more stars on Github, more followers on Github and more forks.
minimist has less dependencies, more daily downloads, more weekly downloads and more monthly downloads.
optimist has been out there for longer (since 5 years ago), it also has less open issues.
yargs has more versions, more frequent updates, a bigger community of maintainers and less open pull requests.
In our review commander got 13,055,258 points, minimist got 16,860,583 points, nomnom got 662,673 points, optimist got 5,470,661 points and yargs got 9,680,287 points. The points are a summary of how big the community is and how well the package is maintained.
Lets dive deeper and have a look at some more details on those packages.