cli-qa
Command-line Questions & Answers. Supports color formatting, lists, yes/no confirmations.

Install
$ npm install cli-qa
Usage
var QA = require('cli-qa')
var questions = [
{ key: "name", title: "Hey! What's your name?" },
{ key: "foods", title: "What are your 3 most favorite foods?", list: 3 },
{ title: "Favorite books?", description: "Type as much as you want!", list: true },
"Thoughts?",
{ title: "That's all?", description: "Yes/No", bool: true }
];
QA(questions, function (answers) {
console.log(answers)
})
Styling
Title and description fields can be styled with style-format interface. Here is an example;
QA([{ title: "{green}Yes{reset}/{red}No{reset}?", bool: true }], function (answers) {
answers[yesNo]
})