| order | 200 |
|---|
One executable holds the checker, formatter, build system, documentation generator, language server, profiler, and interop tools. The checker, editor, and build share the type system and incremental engine; documentation uses the same lossless parser without invoking the checker.
nupp check
nupp build
nupp testEvery command takes -h, and nupp help <command> prints the same reference.
| Command | Purpose | More |
|---|---|---|
check |
Type-check the project | cli.md |
build |
Check a library, or build a VM program binary or documentation site | build.md |
run |
Compile and run | cli.md |
test |
Build, then run the bundled or configured suite | testing.md |
fmt |
Format; fixed style | fmt.md |
doc |
Generate an API site from the parse | doc.md |
lsp |
Language server, and CLI equivalents | lsp.md |
explain |
Describe a diagnostic code | diagnostics.md |
lints |
List the lints and their levels | lints.md |
import-c |
Turn a C header into declarations | c-interop.md |
export-c |
Export Nupp struct layouts and entry declarations | c-interop.md |
migrate |
Convert annotated Lua into Nupp | luacats.md |
bc |
Show the VM bytecode a file compiles to | performance.md |
bench |
Run isolated benchmark programs | benchmarks.md |
reference |
Print focused language and tool reference | diagnostics.md |
ownership-audit |
Report resource obligations and transfers | ownership.md |
test --coverage |
Aggregate Nupp coverage data | testing.md |
completions |
Generate shell completion definitions | cli.md |
task |
List targets, or run a configured project task | project-tasks.md |
clean |
Remove configured build outputs | build.md |
fixpoint |
Verify the self-hosting rebuild | distribution.md |
ast |
Dump a parsed syntax tree | cli.md |
version |
Print the compiler version | cli.md |
nupp check # the whole configured project
nupp check src/app.nupp # one fileCheck the whole project rather than the file you changed. That is what lets Nupp verify module boundaries, ownership contracts, and project lint settings together. See file types for what each extension is checked for, and modules for the boundaries it checks.
Every command that produces data takes --format json (written --json), and
each one also takes --schema, which prints the JSON Schema of that output. A
test runs each command for real and validates its output against its own schema,
so the two cannot drift.
nupp check --json
nupp check --schema
nupp build --json # diagnostics, the target, and every path written
nupp test --json # a record per test: name, status, duration, failureColor is off whenever output is not a terminal, so a pipe never carries escape
codes. --color=always forces it back on; NO_COLOR, CLICOLOR_FORCE, and
TERM=dumb are honored. See JSON and
schemas for the options every command
shares.
Every diagnostic has a stable code, a source span, and often a
machine-applicable fix. nupp explain turns the code into the rule, a program
that reports it, and the same program corrected:
nupp explain NUPP2119See diagnostics for the format and the JSON shape, and lints for the ones a project can configure or suppress.
nupp lsp serve speaks LSP over stdio. It provides diagnostics, hover,
completion, signature help, go-to-definition, references, rename, document and
workspace symbols, semantic tokens, folding, selection ranges, formatting, and
the checker's code-action quick fixes.
The same operations are available without an editor, which is what makes them usable from a script or an agent:
nupp lsp inspect --json FILE LINE COLUMN
nupp lsp definition --json FILE LINE COLUMN
nupp lsp references --json --include-declaration FILE LINE COLUMN
nupp lsp symbols --json [--file FILE] [PATTERN]
nupp lsp rename FILE LINE COLUMN NEW_NAME # previews; --write applies
nupp lsp actions --json --only quickfix FILE LINE COLUMNPositions are 1-based byte line and column numbers, matching the compiler's diagnostics.
::: seealso
- editors.md for the VS Code extension and the Claude
Code plugin in
editors/ - lsp.md for every capability the server advertises
- lsp.md for the same operations from a script :::
nupp fmt # list what is unformatted, project-wide
nupp fmt --write # rewrite in place
nupp fmt --check # report only; exits 1 if anything is unformatted
nupp fmt src/x.nupp # format one file to stdoutThe formatting rules are fixed. --width controls the code wrap column, while
--no-method-parens and fmt.methodParens = false preserve Lua's unparenthesized
method-call sugar. The formatter guarantees the output re-lexes to an identical
token sequence, so it cannot change a quote style, numeric literal, or trailing
comma. See
formatter for what each way of calling it
does with its result.
nupp build # the default manifest target
nupp build --target docs # a named target
nupp task --list # what targets exist
nupp clean --dry-run # what clean would removeBuilds are incremental across processes. A source edit rechecks that module; dependents are only invalidated when its exported interface changes. See build system for the manifest, targets, caching, and native dependencies.
nupp run --watch app.nuppAt a safe loop boundary, call debug.reload.poll(). Function body edits
commit without recreating application state, closures included; broken or
structural edits leave the last good generation running. Watch mode runs on the
VM CLI. See hot reload for which edits
commit and which need a restart.
nupp doc --kind site -o build/docs src
nupp doc --kind markdown -o docs/api.md srcnupp doc reads the parser's lossless CST and never invokes the checker or the
code generator, so a documentation build costs parsing and rendering alone. This
site is built by it. See documentation
generator for the doc-comment tags, the public surface rule,
and how handwritten pages join the generated ones.