Tea — a strongly typed scripting languageCompiles native via LLVM
Tea
DocsPlaygroundExamplesReferenceCommunity
GitHub

Tea Language

A strongly typed scripting language for native tools.

© 2026 Tea Language.

ContributingCommunityRepository

Language Runtime

Built-ins

Standard Library

std.argsstd.assertstd.audiostd.encodingstd.envstd.fsstd.hashstd.httpstd.netstd.jsonstd.mathstd.parsestd.pathstd.processstd.randomstd.regexstd.stringstd.timestd.url

Standard Library

std.random

Pseudo-random values from a global xoshiro256++ generator.

Exported functions

pub def seed(value: Int) -> Void

Deterministically reseed the global generator.

pub def float() -> Float

Return a uniform random Float in [0, 1).

pub def between(min: Int, max: Int) -> Int

Return a uniform random Int between min and max, inclusive.

pub def flip() -> Bool

Return true or false with equal probability.

pub def chance(probability: Float) -> Bool

Return true with the given probability (0.0 never, 1.0 always).

pub def bytes(count: Int) -> List[Int]

Return a list of uniform random bytes (0-255).

pub def choice[T](items: List[T]) -> T

Return a uniformly chosen element of a non-empty list.

pub def shuffle[T](items: List[T]) -> List[T]

Return a new list with the elements in uniformly random order.

pub def uuid_v4() -> String

Return a random UUID (version 4, variant 1) as lowercase hex.