Documentation

Installation

Download Cream from the releases page. No Python or dependencies required.

# Windows
cream.exe hello.cream

# Linux / macOS
chmod +x cream-linux
./cream-linux hello.cream

# Python (any platform)
python cream.py hello.cream

Hello World

-- Comments use double dash
name = "World"
say "Hello, {name}!"

Variables

No keywords needed — just assign directly.

name   = "Alice"    -- string
age    = 25          -- number
active = yes         -- boolean (yes/no)
scores = [88, 92, 75] -- list

Control Flow

if age >= 18
    say "Adult"
or if age >= 13
    say "Teen"
else
    say "Child"

Loops

-- Repeat N times
repeat 3
    say "Hello!"

-- For each loop
for each x in [1, 2, 3, 4, 5]
    say x * 2

-- Range
for each i in range(1, 11)
    say i

Actions (Functions)

action greet(name, greeting = "Hello")
    return "{greeting}, {name}!"

say greet("Bob")
say greet("Alice", "Hi")

Pipeline

Chain operations with the | operator.

result = [1,2,3,4,5,6,7,8,9,10]
    | filter(x → x % 2 == 0)
    | map(x → x * x)
    | sum
say result  -- 220

Structs

struct Point
    x: number
    y: number

p = Point(10, 20)
say "Point: {p.x}, {p.y}"

Error Handling

try
    data = net("https://api.example.com", "json")
on error e
    say "Failed: {e.message}"

Standard Library (450+ ops)

math(x, "sqrt")          -- sqrt, pow, sin, cos...
rand(1, 100)              -- random number
stats(list, "mean")       -- mean, median, std...
str_(s, "upper")          -- upper, lower, trim...
file(path, "read")        -- read, write, append...
net(url, "json")          -- GET, POST, download...
convert(x, "km", "miles") -- unit conversions
date("today")             -- today, time, format...

Cream IDE

Full-featured IDE with syntax highlighting, line numbers, F5 run, dark theme.

pip install PyQt6
python cream_ide_standalone.py

VS Code Extension

ext install MauyaApps.cream-language

Syntax highlighting, snippets, comment toggling with --.

Run in Browser

Open docs/cream-lang.html from the repo in any browser.