cli-chain

    0.0.12 • Public • Published

    🖥⛓ cli-chain

    NPM version MIT License fliphub flipfam

    easy, powerful, interactive, fluent cli.

    📖 documentation

    📘 examples

    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('cli-chain')
     
    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('cli-chain')
     
    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()

    👽 exports

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

    Install

    npm i cli-chain

    DownloadsWeekly Downloads

    3

    Version

    0.0.12

    License

    MIT

    Last publish

    Collaborators

    • aretecode