| Crates.io | rollers |
| lib.rs | rollers |
| version | 1.2.0 |
| created_at | 2026-01-04 22:12:28.837734+00 |
| updated_at | 2026-01-11 18:17:57.328858+00 |
| description | A Rust CLI dice roller |
| homepage | |
| repository | https://github.com/trunar/rollers |
| max_upload_size | |
| id | 2022613 |
| size | 23,405 |
A Rust 🦀 CLI dice roller.
If you want to use Cargo for installation or to build the binaries yourself, ensure you have the Rust toolchain installed. If you don't have it yet, you can get it via rustup.rs.
The musl build is a static binary that works on almost any distribution.
tar -xzvf rollers-x86_64-unknown-linux-musl.tar.gzsudo mv rollers /usr/local/bin/sudo chmod +x /usr/local/bin/rollerstar -xzvf rollers-apple-darwin.tar.gzsudo mv rollers /usr/local/bin/xattr -d com.apple.quarantine /usr/local/bin/rollers.zip file and select "Extract All".rollers.exe to a folder in your System PATH (e.g., C:\Windows\).cargo install rollers
cargo install --git https://github.com/trunar/rollers
If you are not content with installation options, you could build the binaries yourself. Follow these commands to clone the repository and compile the binary:
# Clone the repository
git clone https://github.com/trunar/rollers
cd rollers
# Build the project in release mode
cargo build --release
Once the build is complete, you can find the executable in the target/release directory. Use the -h flag to view the help menu:
./target/release/rollers -h
Usage: rollers [OPTIONS] <INPUT>
Arguments:
<INPUT> Dice notation (e.g., 2d6, 4dF, 1d20+5)
Options:
-q, --quiet Only show the final result
-e, --exploding Roll again on max value
-r, --repeat <N> Repeat the roll N times [default: 1]
-a, --average Show the average instead of rolling
--highest <N> Keep only the highest N dice
--lowest <N> Keep only the lowest N dice
--drop-highest <N> Drop the highest N dice
--drop-lowest <N> Drop the lowest N dice
-h, --help Print help
-V, --version Print version
Standard roll (with modifier):
$ rollers 3d6+1
Pool: 6, 6, 6
Modifier: +1
Total: 19
FUDGE / Fate roll:
$ rollers 4dF
Pool: -, +, +, 0
Total: 1
Quiet mode (script friendly):
$ rollers 1d20 --quiet
3
Average of a roll:
$ rollers 2d6 --average
Average: 7.00
Keep 2 highest dice:
$ rollers 3d20 --highest 2
Pool: 15, 7, 4
Kept: 15, 7
Total: 22
Drop 1 lowest die:
rollers 4d6 --drop-lowest 1
Pool: 6, 5, 2, 2
Kept: 6, 5, 2
Total: 13
rollers 2d6 --exploding
Pool: 5, 6, 3
Total: 14
rollers 4d6 --repeat 2
--- Roll 1 ---
Pool: 1, 6, 1, 4
Total: 12
--- Roll 2 ---
Pool: 4, 3, 1, 5
Total: 13
--drop-highest N or --drop-lowest N (useful for "rolling for stats" where you roll 4d6 and drop the lowest 1).--exploding flag where rolling the maximum value on a die allows you to roll it again and add it to the total.--repeat N flag to roll the same dice expression N times and output each result independently.rollers 1d20+5 2d6 in one go.