Skip to content

Nscript REPL and CLI arguments

Michel Weststrate edited this page Feb 16, 2015 · 2 revisions

nscript CLI arguments

The following arguments can be passed to the nscript script.

  • nscript: starts an nscript REPL, this is very useful for testing. (It is very similar to running node). All shell operations will be directly available on the command line.
  • nscript [filename] will execut the specified script at filename and quite.
  • -h or --help will print the help.
  • -V or --version will print the currently installed version of nscript
  • -v or --verbose will explain in great detail which command nscript is executing during a script run. Similar to callling shell.verbose(true) inside the script.
  • -C [path] or --chdir [path] will change the working directory of the script before starting. Similar to call shell.cd("path") inside the script.
  • --touch [path] create a new nscript file at the specified location and make it executable
  • -x <path> make sure the nscript file at the specified location is executable. On unix, chmod +x will be used, in windows a similarly named .bat file will be created.
  • --local in combination with --touch or -x; do not use global nscript, but the one provided in the embedding npm package