RANDSUM

A flexible, type-safe dice rolling ecosystem written in TypeScript

RANDSUM provides a comprehensive collection of packages for rolling dice, implementing tabletop RPG mechanics, and building dice-based applications. Built with TypeScript, thoroughly tested, and published to NPM with full type definitions.

Quick Start

npm install @randsum/roller
# or
bun add @randsum/roller
import { roll } from '@randsum/roller';

// Simple roll
roll(20); // Returns 1-20

// With notation
roll('4d6L'); // Roll 4d6, drop lowest
roll('2d20H'); // Roll with advantage

Or use directly from your terminal:

npx randsum 2d20    # Roll two twenty-sided dice
npx randsum 4d6L    # Character stat roll (drop lowest)
npx randsum 2d20H   # Roll with advantage