Installation
Core package
Section titled “Core package”The core @randsum/roller package is all you need for general-purpose dice rolling. It has zero runtime dependencies.
bun add @randsum/rollernpm install @randsum/rolleryarn add @randsum/rollerGame packages
Section titled “Game packages”If you are building for a specific tabletop RPG system, install the corresponding game package. Each game package automatically installs @randsum/roller as a dependency.
# D&D 5th Editionbun add @randsum/fifth
# Blades in the Darkbun add @randsum/blades
# Powered by the Apocalypsebun add @randsum/pbta
# Daggerheartbun add @randsum/daggerheart
# Root RPGbun add @randsum/root-rpg
# Salvage Unionbun add @randsum/salvageunion# D&D 5th Editionnpm install @randsum/fifth
# Blades in the Darknpm install @randsum/blades
# Powered by the Apocalypsenpm install @randsum/pbta
# Daggerheartnpm install @randsum/daggerheart
# Root RPGnpm install @randsum/root-rpg
# Salvage Unionnpm install @randsum/salvageunion# D&D 5th Editionyarn add @randsum/fifth
# Blades in the Darkyarn add @randsum/blades
# Powered by the Apocalypseyarn add @randsum/pbta
# Daggerheartyarn add @randsum/daggerheart
# Root RPGyarn add @randsum/root-rpg
# Salvage Unionyarn add @randsum/salvageunionRequirements
Section titled “Requirements”- Node.js 18+ or Bun 1.0+
- TypeScript 5.0+ (recommended but not required)
All packages ship as both ESM and CJS with full type declarations.
Verify installation
Section titled “Verify installation”import { roll } from '@randsum/roller'
const result = roll('2d6')console.log(result.total) // Sum of 2d6If this runs without errors, you are ready to go. Head to the Quick Start guide to learn the basics.