Skip to content

Instantly share code, notes, and snippets.

@Tolsee
Created August 9, 2018 04:35
Show Gist options
  • Save Tolsee/346fac3c22b7934e1ad8398799b75b76 to your computer and use it in GitHub Desktop.
Save Tolsee/346fac3c22b7934e1ad8398799b75b76 to your computer and use it in GitHub Desktop.
A starter command line tool, written in vorpal.js
const vorpal = require('vorpal')();
vorpal
.command('say [words...]')
.description('Echo what you type')
.action(function (args, callback) {
this.log(args.words.join(' '));
callback();
});
vorpal
.delimiter('echo $')
.show();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment