Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dice-roller/cli

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dice-roller/cli

A command line interface for rolling dice.

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by50%
Maintainers
1
Weekly downloads
 
Created
Source

RPG Dice Roller

RPG Dice Roller CLI

Command Line Interface which allows rolling dice.

It is built upon this RPG dice roller.

Get started

Install

Install the script globally:

npm install -g @dice-roller/cli

Usage

roller <notation..> [options]

Commands:
  roller roll <notation..>  roll the dice                              [default]
  roller play               play an interactive CLI dice game

Positionals:
  notation  space separated list of notation to roll                    [string]

Options:
  -V, --version      Show version number                               [boolean]
      --help         Show help                                         [boolean]
  -s, --separator    String to separate dice rolls      [string] [default: "; "]
  -e, --engine       The RNG engine to use                              [string]
      --seed         The RNG engine seed                                [number]
  -f, --format       The output format              [string] [default: "string"]
      --result-only  Only return the roll result, without the notation or dice
                     rolled                           [boolean] [default: false]

Examples:
  roller 4d6     roll a 6 sided die 4 times
  roller 2d10+7  roll a 10 sided die 2 times and add 7
  roller play    start the interactive CLI dice game

For more information visit https://dice-roller.github.io/documentation
roller play

play an interactive CLI dice game

Options:
  -V, --version  Show version number                                   [boolean]
      --help     Show help                                             [boolean]
      --players  The name of a player                                    [array]
      --count    The number of players                                  [number]

For more information visit https://dice-roller.github.io/documentation

Examples:

# Roll a 6 sided die 4 times
roller 4d6

# Roll a series of dice
roller 2d10 7d% 5dF

# Notation with spaces must be surrounded with quotes
roller "4d6 # roll description"

# Use the MersenneTwister19937 engine (`seed` is not required)
roller 4d6 -e=MersenneTwister19937 --seed=415

# Return just the result rolled
roller 2d20 --result-only

# Output the result in base64 encoding
roller 6d8*4 -f=BASE_64

# Start the interactive dice game
roller play

# Start the game with 4 players
roller play --count=4

# Start the game with 2 players called Barbara and Ian
roller play --players=Barbara Ian

# Start the game with two players, but only name the first one
roller play --count=2 --players=Susan

Read about the notation in the documentation

Keywords

FAQs

Package last updated on 27 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc