Command-line reference
The NexusScript executable compiles models and produces artifacts. It is
independent of Nexus Forge and Nexus Build. Run it from a terminal with Nexus on PATH.
| Option | Meaning |
|---|---|
/input=<file> |
Entry model for single-artifact or single-template mode |
/output=<path> |
Output file, or output directory in manifest mode |
/format=json |
JSON output; default when no template/manifest is used |
/format=sqlite |
SQLite database output; requires an output filename and SQLite runtime |
/template=<file> |
Render the model's JSON through a Mustache template |
/manifest=<file> |
Compile declared models and render declared templates/source templates |
/validate |
Apply each model's declared dialect before producing output |
/dialect-root=<directory> |
Fallback catalog for relative dialect paths |
/help |
Show command-line help |
Paths containing spaces must be quoted according to the invoking shell. The examples use forward slashes. Commands return a nonzero exit status on failure. Diagnostics go to stderr; stdout is available for the artifact.
Single model
NexusScript /input=Catalog.nxscript
NexusScript /input=Catalog.nxscript /validate /output=Catalog.json
NexusScript /input=Catalog.nxscript /format=sqlite /output=Catalog.sqlite
NexusScript /input=Catalog.nxscript /template=Catalog.mustache /output=Catalog.txt
Omitting output writes JSON or rendered text to stdout. SQLite requires a file.
Template mode uses JSON internally and cannot be combined with a non-JSON format.
/validate is a switch, not an option taking a Boolean value. Without a declared
dialect, it has no additional domain rules to apply.
Manifest
NexusScript /manifest=Publish.NexusManifest.nxscript /output=generated /validate
Supply the appropriate dialect catalog as described in Manifests when the declared language is not beside the manifest.
Manifest mode requires output and is mutually exclusive with input, template,
and an explicitly supplied format. It validates the manifest and optionally
validates its models through /validate. It stops at failure without removing
files successfully produced earlier in the invocation.
Path resolution
Input, output, template, and manifest command-line paths are relative to the process's working directory. Inside documents, dependency paths are relative to the document that declares them. Inside manifests, model/template sources are relative to the manifest, and template outputs are below the output root.
A relative dialect is searched beside its declaring document first, then in the explicitly supplied dialect root. The dialect root is not a general module search path.
Target selections and external values
The standalone CLI currently supplies neither a target-selection flag nor
application-specific external-value handlers. It compiles an unselected model.
Use a consuming tool's documented target options, or the
native API, when a model requires selected variants or external
read/result handling. There is no /format=live stream output.