toss
A fast dice rolling CLI written in Zig
A lightweight, high-performance command-line dice roller for tabletop RPG enthusiasts. Supports complex dice notation including keep/drop, exploding, rerolling, and arithmetic — all in a tiny ~30KB binary with no runtime dependencies.
Preview
Features
Comprehensive dice notation — keep/drop, exploding, rerolling, percentile, Fudge/Fate
Reproducible rolls via --seed flag for deterministic results
Arithmetic expressions — combine dice and modifiers (2d6+5)
Colorized output with row cycling, respects NO_COLOR
Labeled, aligned output for readability
Cross-platform — Linux, macOS, and Windows
Scriptable — results to stdout, diagnostics to stderr
Tiny binary (~30KB) with zero runtime dependencies
Install
Homebrew
$ brew install shhac/tap/toss GitHub Release (macOS)
$ curl -L https://github.com/shhac/toss/releases/latest/download/toss-0.5.1-aarch64-macos.tar.gz | tar xz Build from Source
$ git clone https://github.com/shhac/toss.git && cd toss && zig build -Doptimize=ReleaseSmall Usage
$ toss 4d6k3 $ toss 2d20kh1 $ toss '1d6!' $ toss '2d6ro<=2' $ toss '4d6!r1k3+5' $ toss --seed 42 2d6