Getting Started
Getting Started
Install Serez Code, write your first script, and get comfortable with the tools. Current version: v3.5.2
Installation
Windows
Download from GitHub Releases:
- sz-windows-x64-setup.msi — installer, adds
szto your PATH automatically. - sz-windows-x64.exe — portable binary, no installation needed.
macOS
- sz-macos-arm64 — Apple Silicon (M1/M2/M3)
- sz-macos-x64 — Intel
chmod +x sz-macos-arm64 mv sz-macos-arm64 /usr/local/bin/sz
Linux
- sz-linux-x64 — x64 static binary
chmod +x sz-linux-x64 mv sz-linux-x64 /usr/local/bin/sz
From source
Requires Rust stable:
git clone https://github.com/Sergio3215/serez-code cd serez-code cargo build --release
Verify
sz --version
All assets for v3.5.2 on GitHub →
Your first script
Create a file called hello.sz:
let name = "Serez"
out "Hello from {name}!"
let nums = [1, 2, 3, 4, 5]
let sum = nums.reduce(0, (acc, x) => acc + x)
out "Sum: {sum}" // → Sum: 15Run it:
sz hello.sz
Note: Use
out to print values. Expressions are not auto-printed when running a file — only in the REPL.The REPL
Run sz with no arguments. Results are printed automatically:
sz >> let x = 10 >> x * 3 30 >> "hello".toUpperCase() HELLO
CLI commands
| Command | What it does |
|---|---|
sz script.sz | Run a script file |
sz | Start the interactive REPL |
sz --watch script.sz | Re-run automatically on every save |
sz --check script.sz | Analyze estimated memory usage without running |
sz --version | Print the installed version |
sz install <name> | Install a package into ./packages/ |
sz uninstall <name> | Remove an installed package |
Watch mode
sz --watch main.sz
Memory check mode
sz --check script.sz Function 'fibonacci': ~312 estimated bytes Criticality: ██ 🟢 < 1KB (Safe) Function 'processData': ~11840 estimated bytes Criticality: ██████████ 🔴 > 10KB (Critical)