Skip to content

Getting Started

Terminal window
curl -fsSL https://zz-lang.pages.dev/install.sh | sh

Verify the install:

Terminal window
zz --version

Create hello.zz:

name := input("What is your name? ")
println("Hello, {name}!")

Run it:

Terminal window
zz run hello.zz

Start an interactive session with bare zz:

ZZ 0.1.0 — type-based language
Type expressions to evaluate. :help for commands.
zz> x := 42
42
zz> x + 1
43
zz> func add(a: int, b: int) -> int { a + b }
<func add>
zz> add(3, 4)
7

Useful REPL commands: :help, :type expr to show a type, :clear to reset bindings, :quit to exit.

func factorial(n: int) -> int {
if n <= 1 { 1 } else { n * factorial(n - 1) }
}
println("5! = {factorial(5)}")
5! = 120

ZZ ships its diagnostics as commands:

Terminal window
zz check src/ # report errors and warnings
zz fix src/ # apply safe auto-fixes
zz fmt src/ # format files in place
zz eval "1 + 2" # evaluate one expression → 3