A multi-paradigm, specification-first language for designing software in the age of AI.
A small set of keywords, and code blocks that read like sentences. Classes, generics and first-class functions fit together in one compact design. Despite being rich and expressive, the whole language is small enough to fit in your head.
The whole syntax โThe specification is part of the code, and the runtime checks it on every call. Design and code can't quietly drift apart, as they often do in fast-evolving production software, and a failure names the exact contract that broke.
Why contracts โAI tools now write code faster than anyone can read it, so you need a boundary you can check. In Nex, that boundary is the contract: it tells a model what to build, and the runtime checks that what it built keeps its promises.
When code is cheap, design the promises โNex compiles to JVM bytecode. Ship your program as a single jar that runs on any machine with Java, with no Nex install needed there. Any Java library is one import away.
bash <(curl -fsSL https://raw.githubusercontent.com/vijaymathew/nex/main/bootstrap-install.sh) jvm --install-depsInstalls Nex system-wide, and Java too if it's missing, so it asks for your administrator password.
bash <(curl -fsSL https://raw.githubusercontent.com/vijaymathew/nex/main/bootstrap-install.sh) jvm --prefix "$HOME/.local" --install-depsInstalls under ~/.local. Needs Java 17 or later already installed. Open a new terminal afterwards so nex is on your PATH.
irm https://raw.githubusercontent.com/vijaymathew/nex/main/install.ps1 | iexRun in PowerShell. Installs for your user account, with no administrator rights needed. If Java is missing, it offers to install it with winget.
Then run nex to open the REPL. Other options and troubleshooting are in the install guide.
Editor support: VS Code, Emacs, and any editor with LSP through nex lsp.