Najova

DocsGuides

Running scripts

The najova command runs scripts, checks them, and tells your editor about them.

CommandWhat it does
najova run bot.najaRuns the script until nothing is left waiting.
najova check bot.najaLists mistakes without running anything.
najova versionShows which Najova you have.

Options for najova run

OptionWhat it does
--safeThe script can only reach files in its own folder, and can't use the web.
--timeShows how long the run took.
--allowLets an extension's helper program run without asking first.

Give values to a script

Anything after the script's name ends up in $args, as a list of text.

greet.naja
$let[who;$item[$args;1]]
$let[times;$number[$item[$args;2]]]
$loop[i;1;$get[times]]
  $print[Hi $get[who]!]
$endloop
najova run greet.naja Lee 2
Hi Lee!
Hi Lee!

When the run ends

najova run ends with code 0 when all went well, and 1 after a mistake, so other tools can tell. $exit ends it at once with the code you choose.