package
GUIs for the command line
npm install cuiGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
.__
____ __ __|__|
_/ ___\| | \ |
\ \___| | / |
\___ >____/|__|
\/
GUIs for the command line.
Command line tools are fast, but they can be hard to use. cui allows you to create optional (and potentially dynamic) views for each parameter your tool requires.
Views are arranged in a sequence, and can display either buttons or fields. After each view collects input, the results are stored and the sequence advances. Views can include an action that executes after the results are stored, but before the sequence advances. Usually a tool's primary "work" is performed in the last view's action.
npm install cui
The examples are all executable scripts - try cd'ing into the example folder and typing ./all
This code below is essentially the same as in example/basic:
var cui = require("cui");
cui.view({
title: "This is a very basic example.",
type: "buttons",
data: [
"One",
"Two",
"Three"
],
action: function () {
console.log("You could do something now with: \"" + cui.results[0] + "\"");
}
});