Command line
Every flag nish --help lists, in the order and the groups it lists them. The CLI in the guide shows them at work; the diagnostic index lists every code a check can report.
Usage
nish <file.ts> [more.ts ...] [flags] compile to LLVM IR
nish run [flags] <file.ts> [args ...] build, cache and run it
nish run --watch <file.ts> [args ...] rebuild and rerun it on each edit
nish upgrade [<version>] [--check] install a newer release
nish -v, --version | -h, --help
Dialect
--compat[=<feature>,...]compatibility dialect; implies f64 numbers
--number-modei32|f64what a bare number is; i32 by default
Build
--link<exe>link a native binary; the entry exports main
--profilespeed|size|debug|wasithe link recipe; speed is -O3 with LTO
--cpux86-64-v3allow AVX2; such a binary needs it to start
--pgo-generatelink a binary that writes a .profraw per run
--pgo-use<file.profdata>optimise the link with a merged profile
--target<triple>|hoststamp the IR with a target's data layout
--threadsan arena per thread, for --emit-napi-async
--debug-arenatrap a stale arena reference; for tests, slow
--host<file.ts>a page module whose functions wasm imports
--plainthe IR without LLVM's attributes
--no-strict-exportskeep every function externally visible
--no-stack-allockeep every value off the stack
Output
-o, --output<file.ll>|<dir>/where the IR goes; a dir gets one per module
-gDWARF debug info, for gdb and lldb
--runtime-declsdeclare the runtime even when unused
--emit-header<file.h>a C header for the exports
--emit-dts<file.d.ts>their typings, and a <file>.mjs loader
--emit-napi<shim.c>a Node-API shim, to load them from Node
--emit-napi-async<shim.c>the same, plus a promise for each export
--emit-ts<dir>the program as TypeScript, instead of IR
--emit-astprint the parse tree, one line per node
--emit-checkedprint what the checker recorded
--emit-panics<file.json>list every place the program can panic
--emit-arena<file.json>write the arena retention report
--emit-capabilities<file.json>write the capability report
Diagnostics
--fixapply the safe fixes in place, then recheck
--jsoneach diagnostic as one JSON line on stdout
--warn-portabilitywarn where TypeScript would answer otherwise
--no-warn-performancesilence the performance warnings
--explain-memorywhy loops and functions keep their memory
--explain-layoutwhich classes the compact-class rule picks
--capabilitiesprint what the program can reach, on stderr
Policy
--allow<cap>[,<cap>...]refuse a program that reaches more
--deny<cap>[,<cap>...]refuse a program that reaches these
--deny-panicsrefuse an unproven panic in your package
--deny-retentionrefuse retained arena memory in your package
--deterministicsame float bits everywhere, no clock or I/O
--sandbox[=best-effort]confine a Linux binary to what main reaches
--update-capability-lockrecord what each dependency reaches
Agents
nish --help prints this section only when an agent runs it: Colour, and when an agent runs nish says how it tells.
before writing Nish, read the language as rules, traps first:
docs/AI.md, at the path the install put it.
--jsondiagnostics as JSON lines, fixes included
--fixapply those fixes; read only what is left
nish run <file.ts>what the program prints, once it compiles
Exit codes
0 ok, 1 rejected, 2 usage, 3 toolchain, 70 a compiler bug: report it
What each one means is the guide's exit codes table.
Examples
nish run hello.ts # build, cache and run a program
nish app.ts --link app # write app.ll and a binary, app
nish --fix src/*.ts # rewrite what the compiler can fix
NO_COLOR=1 nish --help # this text, without colour

