tpmorp
A simple immersive CLI interface helper
Why?
Because other modules are way too over complicated. tpmorp
has no exernal dependencies and uses just the functionality available in Nodes core readline
module.
How
$ npm install --save tpmorp
var readline = var morp = readline
Example
The example code shows how to use tpmorp in a simple hello/goodbye CLI interface. See example.js
'use strict' var readline = var morp = readline { console } { console } var commands = hello: sub: 'all' 'peter' 'matteo' action: hello description: 'say hello' goodbye: sub: 'all' 'peter' 'dave' action: goodbye description: 'say goodbye' morpstart'test>' commands { if err console morp else commandactionargs { if quit morp else morp } } morp
License
MIT, knock yourself out...