Clad is a programming language designed for LLM code generation — every construct chosen by benchmark on the real Claude tokenizer, not by taste. Claude-first, works with any model.
clad fmt makes every diff semanticfn fib(n:int) -> int expect n >= 0 if n < 2: ret n ret fib(n - 1) + fib(n - 2) range(10) |> filter(x -> x % 2 == 0) |> map(x -> x * x) |> says()
No commas, no semicolons, no braces. Pipelines, contracts (expect / ensure), Python-habit operators, and a dense standard library that covers what Python needs imports for.
This is the real interpreter — the same code that ships in the npm package — running in your browser.
Generated code is paid for by the token, every time. Clad attacks the bill twice: syntax with no separator ceremony, and a standard library dense enough that common data work is one call (freq, group, runs, scan, chunks, maxby…). Token cost of the same 35 tasks, Clad vs Python, real Claude tokenizer:
Methodology and per-version history live in bench/ — both solutions must print identical output, Python is idiomatic and unhandicapped.
err E005 line 1 col 8
expected: a space between items
got: ','
fix: remove the comma — Clad separates list items, arguments and parameters with spaces
Stable error codes, expected / got / fix fields, call-chain tracebacks. In the iterations benchmark, a model writing Clad from the spec alone fixed every mistake in exactly one round. Formatting is never a debate: clad fmt rewrites to the single canonical form, --check guards CI.
npm install -g clad-lang clad run hello.clad clad fmt --check hello.clad
| Language reference | SPEC.md |
|---|---|
| Error codes | docs/errors.md |
| Benchmarks | bench/ |
| Changelog | CHANGELOG.md |
| Package | npmjs.com/package/clad-lang |
| Source | github.com/cladlang/clad · MIT |
| Updates | x.com/cladlang |