KScript docs
EN

Install and editors

Running scripts

Run a script with kscript and its file name. Anything after the name is in $args, a list:

CommandWhat it does
kscript hello.kscriptRun a script.
kscript greet.kscript Joan$args is ['Joan'].

The exit code is 0, the code given to exit, or 3 when the script stops with an error, printed as file:line:column: Type: message. 2 means the command line itself was wrong (see exit codes). Ctrl+C stops a script, and its finally blocks still run.