Spec sheet v0.31.0

Native software, documented for agents.

Nyx compiles to native code through LLVM, hosts its own compiler and ships every project with what an AI agent needs to write it correctly.

Install
$curl -sSf https://nyxlang.com/install.sh | sh

Linux · x86_64 / aarch64 / armv7l · Termux

01 Install

One command to install it. One to start a project.

Requiresclang, make and git, plus the libgc, OpenSSL and zlib development headers. The installer installs whatever is missing with the package manager it finds: apt, dnf, pacman, apk, xbps, or pkg on Termux.
Installs to~/.nyx, with a link at ~/.local/bin/nyx (on Termux, $PREFIX/bin/nyx). If that directory is not on your PATH, the installer adds it to your shell profile and tells you.
Verifynyx --version — prints the installed version.
Updatenyx update — pulls the new version, rebuilds it and prints what changed.
Removenyx uninstall — removes the toolchain and the link it created.
First projectterminal
$ nyx init my-app  creates nyx.toml, src/main.nx, AGENTS.md and docs/nyx/$ cd my-app$ nyx run  builds the project and runs it

Sample

What the language reads like.

sample.nxnyx
enum Shape {
    Circle(int),
    Square(int),
    Rect(int, int)
}

fn area(s: Shape) -> int {
    return match s {            // exhaustive: every variant must be covered
        Shape.Circle(r)  => 3 * r * r,
        Shape.Square(l)  => l * l,
        Shape.Rect(w, h) => w * h
    }
}

fn main() {
    let rect: Shape = Shape.Rect(3, 7)
    print("area = ${area(rect)}")
}
ShowsAn enum with an exhaustive match over every variant, string interpolation and explicit types on every binding.
Checked withnyx check — parses and type-checks, without linking and without running.
Run itnyx sample.nx

03 Develop with agents

Every project ships the context an agent needs to write it.

Seeded by nyx init

AGENTS.mdThe playbook: how to build a program here, the hard rails, the traps that break a first try. Provider-neutral, following the agents.md convention.
CAPABILITIES.mdGenerated index of the standard library — what already exists, so nothing gets reinvented. Regenerated on every build.
docs/nyx/The dense reference plus three guides: write a program, fix a compile error, report friction.

Tooling

  • nyx vetNames the grep-able traps instead of leaving a parser error: warning[W101] src/main.nx:12
  • nyx init --agent=claude,cursor,copilotAn optional short adapter file per tool. AGENTS.md stays the single source of truth; the adapter only points at it.
  • nyx init --sddSeeds the spec-driven scaffolding: constitution, glossary, ADR template and specs/ — so the agent asks instead of inventing.
  • nyx reportLeaves a FRICTION.md in the project. Nothing is sent on its own.
AGENTS.md — seeded by nyx initexcerpt
> **GOLDEN RULE — do NOT read the compiler or stdlib source** (`std/`, `compiler/`, or
> anything under your Nyx install) "to understand how it works". You don't need to and
> you WILL get lost. If you want a function, look it up in `CAPABILITIES.md`. 

## Hard rails (do NOT do these)

- **Do NOT invent syntax.** If you're unsure a keyword/feature exists, it probably doesn't —
  check `CAPABILITIES.md` (or <https://nyxlang.com/by-example/>) instead of guessing.
- **Do NOT reinvent stdlib functionality.** If `CAPABILITIES.md` lists it, use it.
- **Do NOT hack around a limitation.** Report it with `nyx report` and stop.

04 Source

Open, versioned, and honest about being 0.x.

LicenseApache-2.0
Repositoryhttps://github.com/nyxlang-dev/nyx
ChangelogCHANGELOG.md — every release, with what changed and why.
Status0.x: under active development. The API can change, and compatibility between minor versions is not guaranteed.