nelson arg1 ... argn
nelson-cli arg1 ... argn
nelson-adv-cli arg1 ... argn
nelson-gui arg1 ... argn
nelson --webview [--url host] [--port port]
nelson --web [--url host] [--port port]
nelson-webview [--web] [--url host] [--port port]
nelson-cli options -- user_arg1 ... user_argn
| Parameter | Description |
|---|---|
| -cli | selects nelson-cli when passed to the nelson launcher. |
| -adv-cli | selects nelson-adv-cli when passed to the nelson launcher. |
| -gui | selects nelson-gui when passed to the nelson launcher. |
| --webview | selects nelson-webview in desktop webview mode when passed to the nelson launcher. Passed directly to nelson-adv-cli it is instead an option that renders figures with the web (RenderWeb) backend, with no Qt figure windows, while keeping the terminal REPL. |
| --web | selects nelson-webview in HTTP server mode when passed to the nelson launcher. The same option selects server mode for the direct nelson-webview executable. |
| --url host | sets the HTTP host. This option is valid only with --web, --webview, or the direct nelson-webview executable. |
| --port port | sets the web port from 1 to 65535. This option is valid only with --web, --webview, or the direct nelson-webview executable. |
| -- | stops Nelson option parsing. Arguments after this separator are returned by argv('user'). |
| -e, --execute command | executes a Nelson command after startup. Options -e and -f are mutually exclusive. |
| -f, --file filename | executes a Nelson script file after startup. Options -e and -f are mutually exclusive. |
| -F, --file-ipc filename | executes a Nelson script file in an existing Nelson process or creates one. GUI mode only. |
| --help, -h | displays help about program options. |
| --version, -v | returns Nelson version. |
| --vscode | enables Visual Studio Code mode. |
| --open, -o filename1 [filename2 ...] | opens one or more valid existing files in the text editor. GUI mode only. |
| --mat, -m filename1 [filename2 ...] | loads one or more valid existing .nh5 or .mat files. |
| --nostartup | disables the main Nelson startup script. |
| --nousermodules | disables loading user modules. |
| --nouserstartup | disables the user startup script. |
| --minimize | minimizes the main window. GUI mode only. |
| --noipc | disables interprocess features. |
| --withoutfilewatcher | disables file watcher features for this session. |
| --noaudio | disables audio module startup code. |
| --without_python | disables python_engine module startup code. |
| --language, -l lang | sets the session language. Currently, lang can be: fr_FR en_US. |
| --quiet, -q | starts without displaying the banner and version. |
| --timeout seconds | kills the Nelson process after the specified positive number of seconds. |
nelson-cli: basic terminal, no gui framework dependency, no history, no completion.
nelson-adv-cli: advanced terminal, no graphical console, history and completion available.
nelson-gui: graphical console, history and completion available.
nelson --webview and nelson-webview open a native desktop webview by default with a private localhost port that is not printed. Supplying --url or --port keeps the webview open and publishes the same session at the selected HTTP address. If the native webview is unavailable, Nelson stops with an error.
nelson --web and nelson-webview --web start an HTTP server without opening a desktop window and print the served URL.
Mode selector options -cli, -adv-cli, -gui, --webview and launcher-level --web are only valid for the generic nelson launcher. Direct executables such as nelson-cli, nelson-adv-cli and nelson-gui reject them before --. The single exception is nelson-adv-cli --webview, where --webview is accepted as an option that switches the figure backend to web (RenderWeb) rendering.
After --, mode selector tokens are normal user arguments and can be read with argv('user').
Module startup arguments such as --noaudio and --without_python remain visible in argv() for compatibility. New command builders should place user arguments after -- and read them with argv('user').
Quotes used to group arguments are interpreted by the operating system or shell before Nelson starts. Use a portable form such as nelson-cli -e "disp('hello world'); quit".
If Nelson is installed on Windows, the NELSON_RUNTIME_PATH environment variable is defined and can be used to call "%NELSON_RUNTIME_PATH%\nelson.bat".
nelson-adv-cli -q -e "a = 1 + 2"
nelson-cli -e "disp(argv('user')); quit" -- "a b" "c d"
nelson-gui --help
| Version | Description |
|---|---|
| 1.0.0 | initial version |
| 1.4.0 | --without_python added |
| 1.11.0 | About NELSON_RUNTIME_PATH environment variable added |
| 1.11.0 | --vscode argument |