Hub CLI reference
The Unity Hub has a command-line interface to allow you to access some Hub functionality in headless mode.
Read time 5 minutesLast updated 7 hours ago
Before you can use these commands, download and install the Hub.
Global flags
Flag:--errors- Some errors are hidden by default from the console output.
- Use the flag in the command to bring those errors back to the output.
--errors
Display help
From your terminal, navigate to the location of the Hub app executable and run the command-- --headless help-- --headless h---- --Examples
/Applications/Unity\ Hub.app/Contents/MacOS/Unity\ Hub -- --headless help
Manage Editors
To display a combined list of the available releases and installed Editors on your machine, use theeditorseOption | Alias | Description |
|---|---|---|
| | Displays both available releases and Editors installed on your machine. |
| | Displays the available releases. |
| | Displays the Editors installed on your machine. |
Examples
/Applications/Unity\ Hub.app/Contents/MacOS/Unity\ Hub -- --headless editors -r
Set/Get install path
To set or get the path where you have installed the Unity Editors on your machine, use theinstall-pathipinstall-pathOption | Alias | Description |
|---|---|---|
| | Sets the Editor install path to the given path. |
| | Displays the current Editor install path. |
Examples
/Applications/Unity\ Hub.app/Contents/MacOS/Unity\ Hub -- --headless install-path-s /Applications/Unity/Hub/Editor/
Install Unity Editors
To install a new Editor either from the releases list or archive, use theinstalliinstallOption | Alias | Required? | Usage | Description |
|---|---|---|---|---|
| | Yes | | The Editor version to install. |
| | No | | The changeset of the Editor. This information might be required if the version isn't in the release list. To check if a version is in the release list, run |
| | No | | The module ID. Accepts multiple module IDs. Refer to the |
| | No | | Ensures any child modules of the specified |
| | No | | macOS only: Use this argument to explicitly choose between the Apple Silicon or Intel version of the Editor. Defaults to Intel, |
Examples
/Applications/Unity\ Hub.app/Contents/MacOS/Unity\ Hub -- --headless install --version 6000.3.7f1 --changeset 9b001d489a54
Install modules
To download and install a module to an installed Editor, use theinstall-modulesim
The
install-modulesOption | Alias | Required? | Usage | Description |
|---|---|---|---|---|
| | Yes | | Specifies the version of the installed Editor to add the module to. |
| | Yes | | Specifies the module ID. You can add more than one module at a time. |
| | No | | Ensures any child modules of the specified |
Available modules
The following table lists modules available for installation. You can also view this list by displaying help.Module | Module ID |
|---|---|
| Documentation | |
| Android Build Support | |
| Android SDK & NDK Tools | |
| OpenJDK | |
| iOS Build Support | |
| tvOS Build Support | |
| Language packs | |
| Linux Build Support (Mono) | |
| Linux Build Support (IL2CPP) | |
| Lumin OS (Magic Leap) Build Support | |
| Microsoft Visual Studio | |
| Mac Build Support (Mono) | |
| Mac Build Support (IL2CPP) | |
| Mac Dedicated Server Build Support | |
| Universal Windows Platform Build Support | |
| UWP Build Support (IL2CPP) | |
| UWP Build Support (.NET) | |
| Web Build Support | |
| Windows Build Support (Mono) | |
| Windows Build Support (IL2CPP) | |
| Windows Dedicated Server Build Support | |
Examples
/Applications/Unity\ Hub.app/Contents/MacOS/Unity\ Hub -- --headless install-modules --version 6000.3.7f1 -m ios android
Install Editor with modules
You can only install modules with the Hub command-line interface if the Editor was also installed through the Hub. It can be convenient to install an Editor and modules together at the same time. To install a new Editor with modules, use theinstall--module-mExamples
/Applications/Unity\ Hub.app/Contents/MacOS/Unity\ Hub -- --headless install --version 6000.3.7f1 --module android android-sdk-ndk-tools android-open-jdk
Log locations
To view the Hub logs, do one of the following:- Go to Account > Help and Support > Logs.
- Navigate to one of the following locations on your system:
- Windows:
%UserProfile%\AppData\Roaming\UnityHub\logs - Mac:
~/Library/Application\ Support/UnityHub/logs - Linux:
~/.config/UnityHub/logs
- Windows: