whiptail

Whiptail wrapper for nodejs

Usage no npm install needed!

<script type="module">
  import whiptail from 'https://cdn.skypack.dev/whiptail';
</script>

README

whiptail wrapper for nodejs

Build Status Coverage Status Version License Available platform

Installation

npm install whiptail
# have whiptail binary installed (apt-get install whiptail)

API

const Whiptail = require('whiptail');

var whiptail = new Whiptail(); //some options
(async function(){


  var choices = {
    "abc" : "this is a foo",
    "bar" : "this is a bar",
  };

  await whiptail.msgbox("Are you okay");


  var name = await whiptail.inputbox("Enter your name");
  console.log({name});

  var res = await whiptail.menu("Choose a stuff", choices);
  console.log({res});

  res = await whiptail.checklist("Choose anoter stuff", choices);
  console.log({res});

  res = await whiptail.checklist("Choose the last stuff", choices);
  console.log({res});

})();

Credits