Build AI. Ship UI.
Control memory.
Serez Code is a general-purpose language with native AI, terminal UI, GPU compute, and systems programming — all in a single runtime. No GC pauses.
import "serez-ai"
Random.seed(42)
// Build a neural network in 3 lines
let model = new Sequential()
model.add(new Dense(2, 32, "relu"))
model.add(new Dense(32, 1, "sigmoid"))
// Train with Adam optimizer
let opt = new Adam(0.01, 0.9, 0.999)
let hist = model.fit_opt(X, y, new BCE(), 500, opt, false)
out "Final loss: " + hist[hist.length() - 1] // 0.0021Everything you need. Nothing you don't.
One language. One runtime. Zero compromises.
Native AI
Built-in autodiff, neural layers (Dense, Conv2D, LSTM, Attention), and optimizers (Adam, SGD, Momentum). Train models in pure Serez — no Python needed.
UI: terminal & native
serez-ui: a React-style library — components, a virtual DOM and hooks. The same code runs as a terminal UI (TUI) or a native desktop window (GUI), with a responsive .szs stylesheet.
GPU Compute
CPU-backed GPU compute buffers with matmul, axpy, dot, reduce, and map. Same API, zero driver hassle.
Systems Control
Raw memory access, pointer arithmetic, unsafe blocks, and sizeof — all with the ergonomics of a high-level language.
Package Manager
sz install, sz uninstall, sz publish. Local and HTTP registry support. Packages live in ./packages — visible, portable, no magic.
Safe by Design
Typed arrays, bounded arithmetic, private fields, sealed classes, and 379 tests including a dedicated security suite.
See it in action
From neural networks to raw memory — all in the same syntax.
import "serez-ai"
Random.seed(42)
let model = new Sequential()
model.add(new Dense(2, 32, "relu"))
model.add(new Dense(32, 1, "sigmoid"))
Autodiff.tape()
let pred = model.forward(X)
let loss = new BCE().forward(pred, y)
Autodiff.backward(loss)
let opt = new Adam(0.01, 0.9, 0.999)
model.layers.forEach((layer) => {
layer = opt.step_layer(layer)
})Official packages
serez-ai
Neural networks, autodiff, and training loops. Dense, Conv2D, LSTM, Attention, BatchNorm, Dropout, Adam/SGD/Momentum. Keras-like API.
serez-ui
React-style UI library — components, a transparent Virtual DOM and hooks. 13 built-in components, responsive .szs styling, word-wrap and scrolling. Runs in the terminal (TUI) or a native window (GUI).
serez-pack
Package a Serez app into a self-contained .exe / .msi installer. The sz runtime travels inside, so end users run your app without installing Serez Code.
serez-http
HTTP & WebSocket server — Express/Flask-style routes, middleware, rate limiting and CORS for building REST APIs in pure Serez Code.
View docs →serez-apipack
Package a serez-http API into a self-contained Docker image. The host only needs Docker — not Serez Code — to run your service.
View docs →serez-agentai
GPT-style transformer stack + agentic framework — tokenizer, causal attention, KV-cache, sampling, tool calling and episodic memory.
View docs →serez-dotenv
Layered .env loader — reads .env, .env.local and .env.<mode> by priority and resolves variables read-only, never mutating the process environment.
View docs →serez-cobol
COBOL ⇆ Serez source-to-source translator and reverse compiler. Run legacy COBOL code on the Serez runtime with exact fixed-point decimal arithmetic.