Nash: a library to write cli programs in node.js

added by techfort
11/21/2014 3:03:16 PM

152 Views

Really neat utility library to write cli clients and programs


3 comments

techfort
11/21/2014 3:08:56 PM
i found this incredibly useful, in fact i think i'll be rewriting LokiJS's tcp client with nash.

Drew Peterson
11/21/2014 6:53:40 PM
Did you roll your own cli parser, or use a different library?

techfort
11/21/2014 7:54:01 PM
@drewpcodes rolled my own, the concept being that even arguments beyond process.argv[1] are flags and odd arguments are values. You can see an implementation here: https://github.com/techfort/lokijs-server/blob/master/index.js , although in fairness it's not the client, it's the cli to start the tcp server (no difference really in relation to the topic)