is the authoritative source for flags in your installed version. This page covers the main commands. Your release might add flags or commands that appear only in
--help
.
Update the CLI
Use the built-in self-update command to install the latest CLI release:
unity upgrade
Install an Editor
Install a Unity Editor version, optionally with modules.
unity install [version] [options]
The
version
argument is positional and optional:
On an interactive terminal, omitting the version opens an interactive prompt.
On a non-interactive terminal (for example, a CI pipeline), omitting the version is an error.
Version aliases
Alias
Resolves to
latest
The newest available Editor release.
lts
The newest long-term support release.
default
The version configured as your default in the Unity CLI.
6
,
6.5
,
2022
, and similar
The newest release within that major or minor stream.
Install options
Refer to
unity install --help
for the complete list.
Option
Usage
Description
-c, --changeset <hash>
-c 9b001d489a54
Changeset for the chosen Editor, required when the version isn't in the release list.
-m, --module <id>
-m android
or
-m ios webgl
Module IDs to install alongside the Editor. Accepts multiple values.
--cm
,
--childModules
--cm
Also install child modules of each selected module (for example, Android SDK & NDK under
android
).
-a, --architecture <arch>
-a arm64
or
-a x86_64
macOS only. Selects between Apple silicon and Intel builds.
When you pipe CLI output, the default format changes to tab-separated values (TSV). If a script expects human-readable text, set
--format human
explicitly, or parse TSV or JSON instead.
Error output
The CLI writes errors and diagnostic messages to
stderr
, leaving
stdout
free for data output. In JSON mode, the CLI emits errors 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 or 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 for human readers. Don't parse it in scripts. For machine-readable results, use
--format json
.
Log locations
Platform
Path
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 have scripts targeting the CLI embedded in the Unity Hub desktop application (invoked with
-- --headless
), the following tables 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 application.
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...>
(command; 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
Plain text 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:
Review existing scripts and continuous integration (CI) pipelines before switching. The following items describe the areas most likely to require changes.
High: scripts that fail without updates
Replace
-- --headless
invocations with
unity
.
Replace
install -v <version>
with
install <version>
(positional).
Replace
install-modules --version
/
-v
with
--editor-version
/
-e
.
Replace
editors --add
with
editors add
.
Medium: behavior changes that can produce wrong results
Piped
stdout
defaults to TSV, not plain text.
Errors go to
stderr
, not
stdout
.
Progress output format changed. Don't parse it.
Low: additive changes that don't break existing usage