cui
GUIs for the command line
Last updated 7 years ago by jessetane .
Repository · Original npm · Tarball · package.json
$ cnpm install cui 
SYNC missed versions from official npm registry.
             .__ 
  ____  __ __|__|
_/ ___\|  |  \  |
\  \___|  |  /  |
 \___  >____/|__|
     \/

GUIs for the command line.

Why

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.

How

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.

Install

npm install cui

Examples

The examples are all executable scripts - try cd'ing into the example folder and typing ./all

Usage

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] + "\"");
  }
});

Current Tags

  • 0.0.10                                ...           latest (7 years ago)

10 Versions

  • 0.0.10                                ...           7 years ago
  • 0.0.9                                ...           7 years ago
  • 0.0.8                                ...           7 years ago
  • 0.0.7                                ...           7 years ago
  • 0.0.6                                ...           8 years ago
  • 0.0.5                                ...           8 years ago
  • 0.0.4                                ...           8 years ago
  • 0.0.3                                ...           8 years ago
  • 0.0.2                                ...           8 years ago
  • 0.0.1                                ...           8 years ago
Maintainers (1)
Downloads
Today 0
This Week 2
This Month 2
Last Day 0
Last Week 0
Last Month 4
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (2)

Copyright 2014 - 2016 © taobao.org |