1.6 KiB
1.6 KiB
Command-Line Interface (CLI) Guide
This document provides a guide to using the application's command-line interface for headless execution.
Basic Usage
The application can be run in a headless (no GUI) mode, which is ideal for scripting, testing, and server environments. The executable is located at build/bin/nodehub_d.exe.
The general command structure is:
./build/bin/nodehub_d.exe [ARGUMENTS]
Key Arguments
The following are some of the most common arguments used for headless execution:
-
--headless- Required for CLI mode. This flag prevents the GUI from launching.
-
--run- Instructs the application to execute the graph's runtime logic.
-
--graph=<path/to/graph.json>- Specifies the path to the graph file to load and execute. The path should be relative to the executable's directory (
build/bin/).
- Specifies the path to the graph file to load and execute. The path should be relative to the executable's directory (
-
--log-level=<level>- Sets the verbosity of the console output. Common levels include
info,debug, andwarn.
- Sets the verbosity of the console output. Common levels include
-
--max-steps=<number>- Defines the maximum number of execution steps to run before the application terminates. This is a safeguard to prevent infinite loops in graphs.
Example
The following command, taken from run-console.sh, demonstrates a typical headless execution:
./build/bin/nodehub_d.exe --graph=./BlueprintsGraph.json --run --headless --log-level=info --max-steps=1000
This command will:
- Load the
BlueprintsGraph.jsonfile. - Run the graph in headless mode.
- Output logs at the
infolevel. - Stop after a maximum of 1000 execution steps.