Getting Started
The quickest way to start is the browser editor, which needs no installation. To run .nlk files on
your own machine, build the CLI from a repository checkout; there is not currently a published
package installer or standalone binary.
Try It In The Browser
Section titled “Try It In The Browser”Open the editor and choose Run. The starter program is the bubble sort from the Onward! ’26 paper “Assignment Has Never Existed”; on a wide screen, the trace beside the code shows one row per round of its outer loop. The Tour of Nilakan continues from there, one program per lesson.
Build The CLI
Section titled “Build The CLI”Install the repository’s declared Node and pnpm versions, clone the repository, and run:
pnpm check:depspnpm installpnpm check:depspnpm --filter @nlk/cli buildThe first check:deps verifies the required Node and pnpm versions and reports whether the checkout
needs installation. After pnpm install, run it again to verify the workspace, lockfile, installed
dependencies, and required tools. The filtered build produces packages/cli/dist/index.js. After
that, replace nilakan in the examples below with pnpm --silent nilakan:
pnpm --silent nilakan hello.nlkIf you deliberately expose the compiled CLI as a nilakan executable in your own environment, the
shorter commands below are equivalent. The installed CLI also provides nlk as an alias.
Run A File
Section titled “Run A File”Create hello.nlk:
print("hello, Nilakan")Run it:
nilakan hello.nlkThe CLI requires file input to use the .nlk extension.
Run From Stdin
Section titled “Run From Stdin”Use - to read source from stdin:
cat hello.nlk | nilakan -From the repository without a separately exposed binary:
cat hello.nlk | pnpm --silent nilakan -On Windows PowerShell:
Get-Content hello.nlk | nilakan -On Windows cmd.exe:
type hello.nlk | nilakan -First Function
Section titled “First Function”def add(left: num, right: num) -> num: return left + right
print(add(2, 3))Parameter and return annotations are runtime type contracts.
First Commit Loop
Section titled “First Commit Loop”Use init to create loop state and primed assignment to stage the next state.
def exchange() -> tuple[num, num]: init: left = 1 right = 2 done = False while not done: left' = right right' = left done' = True return left, right
print(exchange())Both primed assignments read the same current state. The loop then commits both next-state values together. Thinking In Traces shows how to design loops like this one, starting from the table of values each round should produce.
CLI Reference
Section titled “CLI Reference”See the CLI reference for all supported options and exit codes.