The Unity CLI is a standalone binary that lets you install Editors, manage modules, and automate Hub workflows from the terminal, independently of the Unity Hub desktop application.
Read time 9 minutesLast updated a day ago
Note
The Unity CLI is experimental. Full feature parity with the Unity Hub UI is not guaranteed.
The Unity CLI (invoked as
unity
) is a standalone command-line tool for installing and managing Unity Editors and modules from a terminal. It is distributed as its own binary and can be installed, updated, and used independently of the Unity Hub desktop application.The Unity CLI is well suited for:
Continuous integration (CI) and build agents where installing the full Hub is undesirable.
Scripting and automation that needs structured output (JSON/TSV) and predictable exit codes.
Power users who prefer a terminal-first workflow for everyday Hub tasks.
This page is the primary reference for the Unity CLI. If you use the Hub CLI that runs inside the Unity Hub desktop app (invoked with
The Unity CLI ships as a separate binary. Download and installation procedures depend on your platform and release channel; see the Unity Hub download page and your platform's package documentation.After installation, confirm the CLI is on your
PATH
:
unity --version
If
unity --version
prints a version string, the CLI is ready to use. If the command is not found, add the install directory to your shell's
PATH
or reopen your terminal.
Note
Because the CLI is self-contained, you can keep it installed on machines that do not run the Unity Hub desktop app, such as headless CI workers.
Update the CLI
Use the built-in self-update command to install the latest CLI release:
unity upgrade
Quick start
You can get started quickly with the following key commands:
unity --help # Top-level helpunity install lts # Install the latest LTS Editorunity install-modules -e 6000.3.7f1 -m ios # Add the iOS moduleunity editors -i # List installed Editorsunity open ./MyProject # Open a project in Unity
Get help
The CLI uses a standard
--help
flag on every command and subcommand:
Command
Description
unity --help
Top-level help, including the list of commands.
unity <command> --help
Help for a specific command and its options.
unity <command> <subcommand> --help
Help for a subcommand (for example
unity editors add --help
).
Tip
unity --help
is the authoritative source for flags in your installed version. This page covers the main commands; your release may add flags or subcommands that appear only in
Add one or more modules to an Editor you already installed with Hub or with the CLI:
unity install-modules [options]
Important
You can only add modules to an Editor that was installed through the Hub or the CLI. Editors installed manually must be reinstalled through the Hub or the CLI to receive modules.
install-modules
options
Option
Required?
Description
-e, --editor-version <version>
No
Editor version to add the module to. If omitted on an interactive terminal, you receive a prompt.
-m, --module <id>
No
Module ID(s) to install. Accepts multiple values.
-l, --list
No
List installable modules for the target Editor instead of installing anything.
--all
No
Install every available module for the target Editor.
When you pipe CLI output, the default format changes to TSV. If a script expects human-readable text, set
--format human
explicitly, or parse TSV/JSON instead.
Errors on stderr
Errors and diagnostic messages are written to
stderr
, leaving
stdout
free for data output. In JSON mode, errors are emitted as
{"error": "..."}
on
stderr
.To capture both streams in a shell:
unity install 6000.3.7f1 > install.log 2>&1
Exit codes
Code
Meaning
0
Success.
1
A general error occurred. Inspect
stderr
for details.
130
User cancelled the command (for example with Ctrl+C / SIGINT).
Progress output
Long-running commands (such as
install
) render animated progress bars on an interactive terminal and a static summary when complete. Progress output is intended for human readers; do not parse it in scripts. For machine-readable progress or results, use
--format json
.
Log locations
Logs are located at the following paths:
Windows:
%UserProfile%\AppData\Roaming\UnityHub\logs
macOS:
~/Library/Application Support/UnityHub/logs
Linux:
~/.config/UnityHub/logs
You can also open the log folder from the Hub: Account > Help and Support > Logs.
Migrate from the Hub CLI
If you previously wrote scripts targeting the CLI embedded in the Unity Hub desktop app (invoked with
-- --headless
), the tables below summarize the behavioral and syntactic differences. For full Hub CLI syntax, refer to Hub CLI reference.
Invocation
Hub CLI
Unity CLI
How to run
"Unity Hub.exe" -- --headless <command>
unity <command>
Dependency
Requires the full Unity Hub desktop app.
Standalone binary; no Hub installation required.
Command and flag changes
Area
Hub CLI
Unity CLI
install
version
--version
/
-v <version>
(required flag)
[version]
(optional positional argument)
install-modules
editor version
--version
/
-v <version>
(required)
-e, --editor-version <version>
(optional)
install-modules
module
--module
/
-m <id>
(required)
-m, --module <id>
(optional)
editors
add local Editor
editors --add <path>
(flag)
editors add <path...>
(subcommand; accepts multiple paths)
-v
on
install
Editor version
Reserved.
-V
prints the CLI version.
help
command
Platform-specific help text files
Replaced by
--help
on every command.
Output and errors
Area
Hub CLI
Unity CLI
Default output
Plain text, always
human
on an interactive terminal;
tsv
when piped
Structured output
--json
per command (where supported)
Global
--format json
(
--json
kept for compatibility)
Errors
Written to
stdout
Written to
stderr
(JSON errors:
{"error": "..."}
on stderr)
Progress
Plaintext lines, for example
downloading 23.50%
Animated progress bar; static summary on completion
Exit codes
0
success,
1
error
0
success,
1
error,
130
user cancellation
Removed global flags
These Hub CLI flags have no equivalent in the Unity CLI:
--headless
,
--errors
,
--silent
,
--logLevel
/
-l
,
--bugReporter
,
--debugMode
,
--inspect
,
--userEmail
,
--theme
,
--editorLicense
,
--servicesUrlInterval
,
--cloudEnvironment
.
New commands
The Unity CLI adds commands that are not in the Hub CLI: