CLI Commands
Learn how to use the Novadesk CLI commands to manage your widgets
Table of Contents
Novadesk supports several command-line arguments that allow you to control the application remotely or customize its behavior. These commands are particularly useful for automation, scripting, or integration with other tools.
Available Commands
Exit Command
Gracefully shuts down the Novadesk application.
Syntax:
Novadesk.exe /exit
Novadesk.exe -exit
Novadesk.exe --exitDescription:
- Cleanly terminates the Novadesk application
- Removes the system tray icon and releases all resources
- If Novadesk is already running, the command will be sent to the existing instance
Custom Script Path
Launch Novadesk with a custom JavaScript file instead of the default script.
Syntax:
Novadesk.exe "path/to/custom/script.js"
Novadesk.exe path/to/custom/script.jsDescription:
- Allows you to specify a custom JavaScript file to load on startup
- Path can be absolute or relative to the Novadesk executable
- Quotes are optional but recommended for paths containing spaces
- Only works when starting a new instance of Novadesk
INFO
Novadesk enforces single-instance execution using a global mutex. When you run a command:
- If Novadesk is not running: A new instance starts and processes the command
- If Novadesk is already running: The command is sent to the existing instance via Windows messages
Novadesk Widget Maker (nwm)
The nwm tool is the recommended way to initialize, run, and build Novadesk widgets.
Commands
init
Scaffolds a new widget project from a template.
Syntax:
nwm init <widget-name>Description:
- Creates a new directory with the specified name.
- Copies the default
widgettemplate into the directory. - Automatically updates the
nameproperty inmeta.json.
run
Launches the current widget in Novadesk.
Syntax:
nwm runDescription:
- Must be run from inside a widget directory.
- Launches
Novadesk.exepointing to the localindex.js. - Waits for the process to exit, allowing you to see logs and errors in the terminal.
build
Builds a distributable package for your widget.
Syntax:
nwm buildDescription:
- Validates
meta.jsonfor required properties (name,version,author,description,icon). - Creates a
distfolder with the following structure:WidgetName.exe(Renamed Novadesk executable)Widgets/(Contains recursively copied scripts and folders)
- Dynamically sets the executable's internal
ProductName,CompanyName, andFileDescription. - Supports arbitrary directory structures; any folder in your project (except
dist) will be copied into the outputWidgets/directory.
-v / --version
Shows the current version of the nwm tool.
Syntax:
nwm -v
nwm --version-h / --help
Displays the help menu with usage instructions and available commands.
Syntax:
nwm -h
nwm --help