rdice-cli 0.1.2

Command-line dice roller powered by rdice-core
rdice-cli-0.1.2 is not a library.

rdice-cli

rdice-cli provides the rdice command-line dice roller. It uses rdice-core for dice definitions, expression parsing, rolling, and deterministic analysis.

Install

cargo install rdice-cli

Usage

rdice roll [-f|--folded] [-x|--expanded] [-E|--ev] [-R|--range] <dice-expr...>
rdice [-E|--ev] [-R|--range] <dice-expr...>
rdice list
rdice config path
rdice config edit
rdice help [--no-color]

Examples:

rdice roll 5d6
rdice roll -x 4d6
rdice roll -f -E -R 3d13 2coin 5 -3
rdice -E -R 3d6 5 -3

CLI output uses ANSI colors by default. Pass --no-color or set NO_COLOR to disable color output for scripts and plain-text logs.

Custom Dice

The CLI reads custom dice from RDICE_CONFIG_PATH when set. Otherwise it uses:

~/.config/rdice/config.toml

Example:

[[dice]]
name = "coin"
faces = ["heads", "tails"]

[[dice]]
name = "fate"
faces = [-1, 0, 1]

Custom dice can be referenced without the internal custom prefix, so 2coin resolves to the configured coin die.

License

Licensed under the MIT License.