Niell
A programming language designed for bidirectional humanβAI readability.
Compiles to LLVM IR. Memory-safe by construction. No data races. No VM. No syntactic ceremony.
Signatures read like prose: action greet with name: text -> text. Effects read like contracts: fails with NotFound. The program says what it has to do before saying how it does it.
Status
Pre-release v0.3. The compiler (Rust + inkwell + LLVM 18) implements Phase 1 β the language thin-slice with 407 tests green. Distributable binary for Linux x86_64 (other platforms, build from source).
Try it
A minimal program:
action main
show with "hello, niell"
end
Install the compiler (Linux x86_64):
sudo apt install -y clang xz-utils
curl -L https://niell.dev/dl/niell-linux-x86_64.xz | xz -d > niell
chmod +x niell
sudo mv niell /usr/local/bin/
niell --help
Per-platform details (macOS, WSL2) in Install.
Compile and run the program:
niell hello.niell -o hello
./hello
# β hello, niell
Built with Niell
This site is generated by an SSG written entirely in Niell. The niell binary you just downloaded compiles the same code that produced this page. Pipeline: markdown β AST β HTML, ~1000 lines of Niell.
The source of this page is one click away: download index.md β it's the raw markdown. The HTML you're reading was generated by that logic, running on the same binary you have on your machine.
A real fragment of the template, so you see how Niell reads:
action wrap_in_template with body: text, sidebar: text, meta: PageMeta -> text
title: text = meta.title
description: text = meta.description
canonical: text = meta.canonical
lang: text = meta.lang
og_meta: text = emit_og_meta with meta
json_ld: text = emit_json_ld with meta
return "<!DOCTYPE html>\n<html lang=\"{lang}\">\n<head>..."
end
Each .md of the spec has its raw twin served alongside the HTML β 02-tipos.md, 04-acciones.md, etc. Transparency for curious humans and agents that prefer the source.
What Niell is for
Niell shines in three niches where its design pays off twice.
Agent pipelines
When a loop has Claude (or any AI) as the pipeline interpreter and needs a deterministic authority to validate state, derive retry counters, or reject invalid transitions β that role fits Niell. Tagged unions with exhaustive match close every case at compile time; fails with distinguishes expected failures from bugs; the --json output gives stable contracts consumable from Bash or from another agent.
Spec-driven development
A signature like action authenticate with creds: Credentials -> Session fails with InvalidPassword, AccountLocked is contract and code at once. The compiler requires every on <variant> to be handled, so the spec doesn't go silently stale: if a new error appears, the checker flags it at every call site until it's covered. The system's documentation and its code are the same thing.
Introspectable CLI tools
Errors with stable codes (niell explain NIELL-PARSE-001 returns description + example + fix pattern), versioned --json output, schema introspectable via niell describe --json. CLIs written in Niell are consumable by humans and by scripts without parsing prose, and agents can ask them "what do you understand and what errors can you throw" before invoking.
Concrete projects with code and walkthroughs in preparation β Projects section pending.
Why Niell
Before LLMs, translating intent into code was the human's exclusive responsibility. Today that translation is no longer a human monopoly, but AI doesn't replace it either. Programmer and AI work as peers.
What's scarce between them is no longer writing code β it's reviewing it. Validating that it does what it has to do, spotting what's wrong, deciding if the direction is right.
Niell puts that review front and center. The syntax pushes the contract to the front; the orchestration mechanics stay behind. The compiler guarantees memory safety, security, and freedom from data races; human and AI split the rest.
Links
- Getting started β your first program in 10 minutes
- Install β installation by operating system
- 01 Syntax (ES) β keywords, operators, blocks
- 02 Types (ES) β primitives, structural relations
- Keywords (ES) β full compiler catalog
- llms-full.txt β dense guide for AIs: 10 non-obvious rules, patterns, anti-patterns, all inline