Niv-Lang

A simple language for real apps. Short to write, clear errors, no boilerplate.

Install

A first look

fn double(x) -> x * 2
let name = "Karan"
print("Hello {name}", double(21))

Run it with niv run. Niv-Lang's compiler is written in Niv-Lang itself.

Learn Niv-Lang

  • How to use it, and how to learn it, in one book.
  • Every feature has a short way and a long way. Write whichever you like.
  • Mistakes give a clear message, or an automatic fix with a warning. Nothing fails silently.

For AI assistants

Any AI (ChatGPT, Claude, Gemini, anything that can open a link) can read Niv-Lang and write code in it. Give it this prompt:

Plain-text files for machines: llms.txt (short index) and llms-full.txt (the full guide with rules).

Your feedback

  • Tell us what you liked, what is missing, or what broke.
  • A suggestion, a review or a bug report: all of it helps Niv-Lang get better.