---
title: Unity CLI configuration, diagnostics, and maintenance commands
product: Unity command-line interface (CLI)
canonical: https://docs.unity.com/en-us/unity-cli/reference/cli-config-diagnostics-commands
last_updated: 2026-11-02
generated_at: 2026-11-04T17:21:25.751Z
locale: en-us
---

# 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.

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                                                                                                                                                                                                                                                                   |
| :--------------------------------------------- | :----- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `doctor`                                       |        | Prints a diagnostic snapshot and environment health checks.                                                                                                                                                                                                                   |
| `diagnose`                                     |        | Prints focused diagnostic reports, such as a redacted proxy report or the resolved Unity Accelerator endpoint (`diagnose accelerator`).                                                                                                                                       |
| `logs`                                         |        | Reads and tails the CLI's log file.                                                                                                                                                                                                                                           |
| `env`                                          |        | Prints environment paths and versions used by the CLI and the Hub.                                                                                                                                                                                                            |
| `context`                                      |        | Saves and switches between named sets of account, organization, project, Editor, and install path (`context save`, `use`, `list`, `current`, `delete`).                                                                                                                       |
| `config`                                       |        | Views or changes CLI settings by key (`get`, `set`, `list`, `unset`, `resolve`) or through dedicated subcommands, such as, the proxy server and update checks. `config accelerator` stores the Unity Accelerator endpoint that `run`, `test`, and `build` pass to the Editor. |
| `analytics`                                    |        | Manages usage-data consent (`opt-in`, `opt-out`, `status`).                                                                                                                                                                                                                   |
| `cache`                                        |        | Shows or cleans the download cache, or print a deterministic cache key for a project's `Library` folder (`cache key`).                                                                                                                                                        |
| `bug`                                          |        | Reports a bug to Unity, interactively or through flags.                                                                                                                                                                                                                       |
| [`language`](#change-the-cli-display-language) | `lang` | Shows or changes the CLI display language.                                                                                                                                                                                                                                    |
| `completion`                                   |        | Prints a shell completion script for bash, zsh, fish, or PowerShell.                                                                                                                                                                                                          |
| `shell`                                        |        | Starts an interactive session that runs many commands in one warm process.                                                                                                                                                                                                    |
| `changelog`                                    |        | Shows release notes for the installed CLI.                                                                                                                                                                                                                                    |
| `docs`                                         |        | Opens the Unity documentation page for a class or topic, that matches your project's Unity version. `--url` prints the address instead.                                                                                                                                       |
| `plugin`                                       |        | 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, `cli-log.json`, in the shared Unity Hub logs directory. Read and follow it with `unity logs`, or include it in a diagnostic snapshot with `unity doctor`.

| 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**.

## CLI lifecycle

| Command                                | Alias | Description                                                                                                                                      |
| :------------------------------------- | :---- | :----------------------------------------------------------------------------------------------------------------------------------------------- |
| [`self-update`](#update-the-unity-cli) |       | Updates the `unity` CLI binary to the latest release. Use `--target <version>` to install a specific release. `upgrade` remains a working alias. |
| `self-uninstall`                       |       | Removes the CLI binary, environment files, and stored credentials.                                                                               |
| `version`                              |       | Prints the CLI's version, release channel, commit, platform, architecture, and runtime.                                                          |
| [`help`](#help-commands)               |       | Displays help for any command. Equivalent to `--help`.                                                                                           |

## Update the Unity CLI

Use the built-in self-update command to install the latest CLI release:

```shell
unity self-update
```

`unity upgrade` remains a working alias, so existing scripts keep running.

If a download is interrupted, the next `unity self-update` resumes the download instead of starting over.

To install a specific CLI release, pass `--target` with a version, a version with a leading `v`, or `latest`:

```shell
unity self-update --target <version>
unity upgrade --target <version>
```

For more information, refer to [Install a specific Unity CLI version](../use-unity-cli#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:

```shell
unity version --format json
```

A bare `unity --version` still prints only the version string. Set a machine format before the flag (`unity --format json --version`, or `UNITY_FORMAT=json unity --version`) to switch it to the same structured object, as the flag ends option parsing.

## Help commands

| 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 might add flags or commands that appear only in `--help`.

## Change the CLI display language

Show the current CLI display language, or change it to a supported language.

```shell
unity language [options]
```

Alias: `lang`. Run `unity language --help` for the list of supported languages and the exact option names.
