Skip to content

CLI wrapper around inquirer's pretty CLI user prompts

License

Notifications You must be signed in to change notification settings

gpittarelli/inquest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

inquest

Implements a simple inquest script exposing some of inquirer's power to shell scripts.

Commands

--help

$ inquest --help

  Usage: inquest [options] [command]


  Commands:

    confirm     Ask the user Yes/No
    checkbox    Ask the user to select multiple values
    fuzzy       Ask the user to select a value, autocompleted with fuzzy matching
    help [cmd]  display help for [cmd]

  Options:

    -h, --help     output usage information
    -V, --version  output the version number

confirm

$ inquest confirm

  Usage: inquest-confirm [options] <messsage...>

  Prints the given message and asks the user to confirm (yes) or
  abort (no). Exits with status 0 if yes is chosen; else 1.

  To protect especially sensitive operations, you can specify
  --key=somePhrase to require the user to enter exactly somePhrase.

  Options:

    -h, --help      output usage information
    -V, --version   output the version number
    -k --key <key>  Specific phrase instead of 'yes'

confirm demo

fuzzy

$ inquest fuzzy

  Usage: inquest-fuzzy [options] <message> <options...>

  Displays the given message and allows the user to select from the
  specified options with fuzzy-matching autocomplete. The selected
  value is printed to the specified output file. Exits with status
  0 if a value is chosen; else 1 (eg, user aborts with Ctrl-C).

  Options:

    -h, --help                    output usage information
    -V, --version                 output the version number
    -o, --out-file <output file>  File to print selected value too

fuzzy demo

checkbox

$ inquest checkbox

  Usage: inquest-checkbox [options] <messsage> <options...>

  Asks the user to select 0 or more of the supplied values.

  Options:

    -h, --help                    output usage information
    -V, --version                 output the version number
    -o, --out-file <output file>  File to print selected values too

License

Released under the MIT License. See the LICENSE file for full text

Copyright © 2017 George Pittarelli