Install#
You can install the numscript cli with one of the following ways:
Using curl#
For Mac and Unix:
Using golang toolchain#
Check#
You can use the numscript check command to run static analysis on a numscript program. The static analysis includes parsing errors, wrong variables or types usage, as well as more advanced checks on numscript constructs.
You can use it this way:
The command will exit with an error status code if there is at least one error or warning.
Run#
Available from numscript@0.0.19
You can use the CLI to run local scripts (mostly intended for local prototyping).
For example, given this script:
And this inputs file (which has to have the same name of the numscript file, plus the .inputs.json suffix):
You can run the file using:
You'll see the postings:
Test#
Available from numscript@0.0.19
You can use the numscript test to check that the specs given in a numscript specs format file are valid for a given numscript.
For example:
This will look into all the src/domain/numscript folder to find all the <file>.num that have a corresponding <file>.num.specs.json specs file