flipcli

0.0.7 • Public • Published

⛓🖥 flipcli

NPM version MIT License fliphub flipfam

easy, powerful, interactive, fluent cli.

full api

extending vorpal it comes with all the goodies, nestable interactive command action stories with ~10x less lines of code than any other lib.

allthat

const {CLI, log} = require('flipcli')
 
CLI.program()
  .command('release')
    .actionPrompt('confirm')
      .type('confirm')
      .message('Are you sure you want to release?')
    .step('env')
      .checkbox('production', true)
      .checkbox('development', false)
    .then((args) => {
      if (args.continue) log.yellow('Good move.').echo()
      else log.bold('Off we go!.').data(args).echo()
    })
  .command('skeleton')
    .alias('seed')
    .alias('scaffold')
    .actionPrompt('is this cool or what?', 'confirm')
  .parse()
  .show()

storytelling

cli

const CLI = require('flipcli')
 
const easyButton = CLI
  .step('presets', 'checkbox', '[presets message]')
    .checkbox('production', true)
    .checkbox('development', false)
  .step('approved')
    .checkbox('magical', true)
    .checkbox('unicorns', false)
      .child('unicorn babies', 'input')
        .input('so cute!')
        .toSteps()
  .step('confirm or deny?', 'confirm')
    .child('fosho fosho?', 'confirm')
    .toSteps()
  .step('view', 'list')
    .choice('React')
    .choice('Inferno')
    .choice('Vue')
    .choice('Angular')
    .choice('other')
    .step('other', 'input').when(answers => answers.view == 'view.other')
 
easyButton.run()

extendable

const {
  vorpal,
  inquirer,
  log,
 
  Program,
  Stepper,
  Steps,
  Question,
  Choice,
  Core,
= require('flipcli')

Package Sidebar

Install

npm i flipcli

Weekly Downloads

6

Version

0.0.7

License

none

Last publish

Collaborators

  • aretecode