21 comments

[ 5.4 ms ] story [ 61.0 ms ] thread
Commander has been around for a good while now, and is a pretty solid library. I really appreciate how easy it makes writing git style subcommands with good isolation of options/flags between the entry-point command vs subcommands.

example of a subcommand heavy CLI using commander: [mite-node](https://github.com/jdc0589/mite-node/blob/master/lib/cli/ind...)

Commander is great. Anything by TJ Holowaychuk is worth using in any Node.js project. Dude is legit.
wtf haha this is SUPER old. FWIW I also really like the docopt approach, really cool
(comment deleted)
oh hackernews! you guys downvote the author of the program that's being discussed. facepalm
Somewhat related, but I've been looking for a node.js-based module for providing a telnet/MUD CLI but either it's implemented through a web page with an input box, or has only the basic telnet protocol fleshed out with no user interaction. Any ideas?
https://github.com/shawncplus/ranviermud Its a super basic MUD written in Node. It has some telnet libraries you might want to take a look at.
Ah hah, I'd known about ranviermud but hadn't noticed it had a telnet lib! Will give it a look-see, thank you!!
As far as I'm concerned, docopt (on HN yesterday: https://news.ycombinator.com/item?id=7830559 ) obsoletes all other command line parsing libraries.

Yes, there is a Node.js implementation.

Armin Ronacher explained why he made click and particular cases where docopt was too limited (although he said for cases where docopt works then it is very good).

Also docopt only does command line parsing, that is only a very small part of a command line interface and there are lots of libraries like inquirer (https://github.com/sboudrias/inquirer.js) that a very good at doing the other stuff.

I don't think the name is too apt, considering "commander" at this point refers to a heritage of file managers with distinctive UIs.
Commander.js is a few years old and adopts the name from a ruby project of the same name (from same author) from 09.