Various eye-candy gadgets for your Node.js command-line interface
$ cnpm install eye-candy-cli
Various eye-candy gadgets for your Node.js command-line interface.
eye-candy-cli
is a set of promisified tools that make your Node.js CLI look pretty and funny.
This project is an aggregation of many other modules. All the credits of what you'll get on your CLI have to go to the creators of those modules. See in the dependencies
in package.json for more info about those modules. The idea behind this aggregation is that some of the tools may be mixed together for even better fun! See the demos
folder for examples and insights about mixing the tools together.
Beyond the aggregation of those modules, most of them are made available with Promises.
eye-candy-cli
is available on NPM. To get it, just run:
npm install eye-candy-cli
Notes:
Usage:
var ecc = require('eye-candy-cli');
ecc.boxen({
text: 'my-text',
borderColor: 'red',
padding: 2,
margin: 1
}).then(function(data) {
console.log(ecc.chalk.yellow(data));
});
Notes:
cat-ascii-faces
.chalk
.Usage:
var ecc = require('eye-candy-cli');
ecc.catAsciiFaces().then(function(data) {
console.log(ecc.chalk.yellow(data));
});
Notes:
Usage:
var ecc = require('eye-candy-cli');
ecc.catMe('nyan').then(function(data) {
console.log(ecc.chalk.grey(data));
});
Notes:
chalk
.Usage:
console.log(ecc.chalk.cyan('eye-candy-cli'));
Notes:
cli-table
.Usage:
var Table = require('cli-table');
var table = new Table({
head: ['TH 1 label', 'TH 2 label']
, colWidths: [100, 200]
});
table.push(
['First value', 'Second value']
, ['First value', 'Second value']
);
ecc.cliTable(table).then(function(data) {
console.log(ecc.chalk.cyan(data));
});
Notes:
cool-ascii-faces
.chalk
.Usage:
var ecc = require('eye-candy-cli');
ecc.coolAsciiFaces().then(function(data) {
console.log(ecc.chalk.magenta(data));
});
Notes:
cowsay
.chalk
. While coloring the input adjusts the color of the sentence given in the txt parameter, coloring the output will color the entire cow (except for the sentence given in the txt parameter).Usage:
var ecc = require('eye-candy-cli');
ecc.cowsay({
text: ecc.chalk.cyan('eye-candy-cli'),
e: 'oO',
T: 'U '
}).then(function(data) {
console.log(ecc.chalk.yellow(data));
});
Notes:
Usage:
var ecc = require('eye-candy-cli');
ecc.dogefy('Peccp').then(function(data) {
console.log(ecc.chalk.magenta(data));
});
Notes:
Usage:
var ecc = require('eye-candy-cli');
ecc.figlet({
txt: 'eye-candy-cli',
font: 'Small',
horizontalLayout: 'default',
verticalLayout: 'default'
}).then(function(data) {
console.log(ecc.chalk.blue(data));
});
Notes:
qrcode-terminal
.Usage:
ecc.qrcode({
txt: 'eye-candy-cli',
errorLevel: 'Q'
}).then(function(data) {
console.log(data);
});
Notes:
Usage:
ecc.sparkly([
0, 3, 5, 8, 4, 3, 4, 10
]).then(function(data) {
console.log(ecc.chalk.green(data));
});
Notes:
yosay
.chalk
. Coloring the input adjusts the color of the sentence given in the only parameter.Usage:
ecc.yosay(ecc.chalk.cyan('eye-candy-cli')).then(function(data) {
console.log(data);
});
Copyright 2014 - 2017 © taobao.org |