# 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: ```bash ./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=` - Specifies the path to the graph file to load and execute. The path should be relative to the executable's directory (`build/bin/`). - `--log-level=` - Sets the verbosity of the console output. Common levels include `info`, `debug`, and `warn`. - `--max-steps=` - 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`](../../run-console.sh), demonstrates a typical headless execution: ```bash ./build/bin/nodehub_d.exe --graph=./BlueprintsGraph.json --run --headless --log-level=info --max-steps=1000 ``` This command will: 1. Load the `BlueprintsGraph.json` file. 2. Run the graph in headless mode. 3. Output logs at the `info` level. 4. Stop after a maximum of 1000 execution steps.