@juanbrujo/random-cli

0.0.5 • Public • Published

random CLI

node.js Command Line Interface to select randomly from given list or range

npm version

Commands:

-r, --range <int>..<int>            // outputs random integer between 2 integers
-l, --list <elem1>,<elem2>,<elemN>	// outputs random from list of elements
-p, --password <length (int)>       // outputs a random string from a map of characters
-q, --quantity <quantity (int)>		// [option] items to output

Use:

$ node bin/random-cli.js -r 12..20 -q 3     // ✔ Random from range: 15,17,20
$ node bin/random-cli.js -l uno,dos,tres    // ✔ Random from list: "tres"
$ node bin/random-cli.js -p 8               // ✔ Random password: "bM8bkJjk"

Installation:

Globally 👍 (recommended)

$ sudo npm install @juanbrujo/random-cli -g
$ random <option>

Locally:

Clone this repo and use it through node:

$ git clone https://github.com/juanbrujo/random-cli
$ cd random-cli
$ npm install
$ node bin/random-cli.js <option>

TO-DO:

  • global npm installation
  • multiple results (more than one) (thanks @rotvulpix ⭐️)
  • check for different results for more than 1 output (thanks @lgaticaq 🍺)

Dependencies (2)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @juanbrujo/random-cli

    Weekly Downloads

    0

    Version

    0.0.5

    License

    MIT

    Last publish

    Collaborators

    • juanbrujo