Unity CLI configuration, diagnostics, and maintenance commands
Configure Unity CLI settings, troubleshoot issues with diagnostics and logs, and update, inspect, or uninstall the Unity CLI.
阅读时间3 分钟最后更新于 17 天前
Use these commands to configure the Unity command-line interface (CLI). You can troubleshoot problems with diagnostic reports and logs, get help on any command, and update, inspect, or uninstall the CLI.
Diagnostics and configuration
Command | Alias | Description |
|---|---|---|
| Prints a diagnostic snapshot and environment health checks. | |
| Prints focused diagnostic reports, such as a redacted proxy report or the resolved Unity Accelerator endpoint ( | |
| Reads and tails the CLI's log file. | |
| Prints environment paths and versions used by the CLI and the Hub. | |
| Saves and switches between named sets of account, organization, project, Editor, and install path ( | |
| Views or changes CLI settings by key ( | |
| Manages usage-data consent ( | |
| Shows or cleans the download cache, or print a deterministic cache key for a project's | |
| Reports a bug to Unity, interactively or through flags. | |
| | Shows or changes the CLI display language. |
| Prints a shell completion script for bash, zsh, fish, or PowerShell. | |
| Starts an interactive session that runs many commands in one warm process. | |
| Shows release notes for the installed CLI. | |
| Opens the Unity documentation page for a class or topic, that matches your project's Unity version. | |
| Views and manages the external components Unity installs for you, such as, the Unity Version Control client. |
Log locations
The CLI writes its own log file, , in the shared Unity Hub logs directory. Read and follow it with , or include it in a diagnostic snapshot with .
cli-log.jsonunity logsunity doctorPlatform | Path |
|---|---|
| Windows | |
| macOS | |
| Linux | |
You can also open the log folder from the Hub: Account > Help and Support > Logs.
CLI lifecycle
Command | Alias | Description |
|---|---|---|
| Updates the | |
| Removes the CLI binary, environment files, and stored credentials. | |
| Prints the CLI's version, release channel, commit, platform, architecture, and runtime. | |
| Displays help for any command. Equivalent to |
Update the Unity CLI
Use the built-in self-update command to install the latest CLI release:
unity self-update
unity upgradeIf a download is interrupted, the next resumes the download instead of starting over.
unity self-updateTo install a specific CLI release, pass with a version, a version with a leading , or :
--targetvlatestunity self-update --target <version>unity upgrade --target <version>
For more information, refer to Install a specific Unity CLI version.
Print the CLI version
Print the CLI's version, release channel, commit, platform, architecture, and runtime as one object in any output format:
unity version --format json
A bare still prints only the version string. Set a machine format before the flag (, or ) to switch it to the same structured object, as the flag ends option parsing.
unity --versionunity --format json --versionUNITY_FORMAT=json unity --versionHelp commands
Command | Description |
|---|---|
| Top-level help, including the list of commands. |
| Help for a specific command and its options. |
| Help for a subcommand (for example, |
Change the CLI display language
Show the current CLI display language, or change it to a supported language.
unity language [options]
Alias: . Run for the list of supported languages and the exact option names.
langunity language --help