Migrate from the Hub CLI to the Unity CLI
Migrate scripts and CI pipelines from the Unity Hub CLI to the Unity CLI by comparing syntax, flags, output formats, exit codes, and identify breaking changes.
Read time 3 minutesLast updated 2 days ago
If you have scripts targeting the CLI embedded in the Unity Hub desktop application (invoked with ), the following tables summarize the behavioral and syntactic differences. For full Hub CLI syntax, refer to Hub CLI reference.
-- --headlessInvocation
Hub CLI | Unity CLI | |
|---|---|---|
| How to run | | |
| Dependency | Requires the full Unity Hub desktop application. | Standalone binary; no Hub installation required. |
Command and flag changes
Area | Hub CLI | Unity CLI |
|---|---|---|
| | |
| | |
| | |
| | |
| Editor version | Reserved. |
| Platform-specific help text files | Replaced by |
Output and errors
Area | Hub CLI | Unity CLI |
|---|---|---|
| Default output | Plain text, always | |
| Structured output | | Global |
| Errors | Written to | Diagnostic text on |
| Progress | Plain text lines, for example | Animated progress bar; static summary on completion |
| Exit codes | | Differentiated codes for usage, auth, and command failures. Refer to Exit codes. |
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--cloudEnvironmentNew commands
The Unity CLI includes many commands that are not available in the Hub CLI, including , , , , , , , , , and . Refer to commands for the full list. The path shorthand is equivalent to .
authopenprojectsuninstallself-updatebuildtestlicenseshellmcpunity ./MyProjectunity open ./MyProjectImpact summary
High: scripts that fail without updates
- Replace invocations with
-- --headless.unity - Replace with
install -v <version>(positional).install <version> - Replace /
install-modules --versionwith-v/--editor-version.-e - Replace with
editors --add.editors add
Medium: behavior changes that can produce wrong results
- Piped defaults to TSV, not plain text.
stdout - Diagnostic error text goes to , not
stderr. Instdoutandjsonmodes, a failed result stays onndjson, so branch on its error code rather than on the stream where the text arrived. Refer to Error output.stdout - Progress output format changed. Don't parse it.
Low: additive changes that don't break existing usage
- New commands: ,
auth,open,projects,uninstall.self-update - New flags such as ,
--verbose, and--list.--all - Version aliases: ,
latest,lts, and short majors.default - New exit code for user cancellation.
130