README
Ucli
Ucli is Node's first framework for building interactive CLI applications. With a simple and powerful API, Ucli opens the door to a new breed of rich, immersive CLI environments like cash and wat.
Contents
Introduction
Inspired by and based on vorpal and vorplajs-reforged, Ucli is a framework for building immersive CLI applications built on an interactive prompt provided by inquirer.js. Ucli launches Node into an isolated CLI environment and provides a suite of API commands and functionality including:
- Simple, powerful command creation
- Supports optional, required and variadic arguments and options
- Piped commands
- Persistent command history
- Built-in help
- Built-in tabbed auto-completion
- Command-specific auto-completion
- Customizable prompts
- Extensive terminal control
- Custom event listeners
- And more
Ucli supports community extensions, which empower it to do awesome things such as piping commands to less, importing commands live or supporting a built-in REPL.
Made with :heart: by ueqt.
Getting Started
Quick Start
Install ucli
into your project:
$ npm install @ueqt/ucli --save
Create a .js
file and add the following:
const Ucli = require('@ueqt/cli').Ucli;
const ucli = new Ucli();
const chalk = require('@ueqt/cli').chalk;
ucli.command('foo', 'Outputs "bar".').action(function(args, callback) {
this.log('bar');
callback();
});
ucli.delimiter('myapp