### Install-modules examples Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Examples of installing modules for a specific Editor version, listing modules, installing all modules, and skipping child modules. ```bash unity install-modules -e 6000.3.7f1 -m ios android unity install-modules -e 6000.3.7f1 -l unity install-modules -e 6000.3.7f1 --all unity install-modules -e 6000.3.7f1 -m android --no-cm ``` -------------------------------- ### Unity CLI hub install example Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Example usage of the hub command to install the Unity Hub desktop application. ```bash hub install ``` -------------------------------- ### Install Editor examples Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Examples of installing Editors with various options: specific version, LTS, changeset, modules, and child modules. ```bash unity install 6000.3.7f1 unity install lts unity install 6000.3.7f1 -c 9b001d489a54 unity install 6000.3.7f1 -m android --cm unity install lts -m ios android webgl ``` -------------------------------- ### Editor command examples Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Examples of listing available releases, installed Editors, and a combined list. ```bash unity editors -r # list available releases unity editors -i # list installed Editors unity editors -a # combined list ``` -------------------------------- ### Unity CLI hub command Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Installs the Unity Hub desktop application. Example: 'hub install'. ```bash hub ``` -------------------------------- ### Install and verify Unity Pipeline package Source: https://docs.unity.com/en-us/unity-cli/unity-pipeline/unity-pipeline-package These commands are run in sequence to install and verify the Unity Pipeline package. First, sign in with 'unity auth login'. Then install the package with 'unity pipeline install', which targets the current directory or running Editor instance by default. Finally, verify the installation with 'unity pipeline list' and check that 'Pipeline: Installed' appears. ```bash unity auth login ``` ```bash unity pipeline install ``` ```bash unity pipeline list ``` -------------------------------- ### Uninstall example Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Example of uninstalling a specific Editor version. ```bash unity uninstall 6000.3.7f1 ``` -------------------------------- ### Migrate to Unity CLI: pipeline install, mcp configure, skill install Source: https://docs.unity.com/en-us/unity-cli/replace-mcp-server-unity-cli Commands to migrate an existing MCP client to the Unity CLI: install the pipeline, configure the MCP server for a client, list supported clients, and install Unity skills for an agent. ```bash unity pipeline install ``` ```bash unity mcp configure ``` ```bash unity mcp configure --list ``` ```bash unity skill install ``` -------------------------------- ### Install a Unity version with a changeset Source: https://docs.unity.com/en-us/unity-cli/release-notes Install a specific Unity version with a specific changeset. This command is mentioned in the release notes as an example of using the --changeset flag. ```bash unity install --changeset ``` -------------------------------- ### Install Unity Editor with modules using -m flag Source: https://docs.unity.com/en-us/unity-cli/use-unity-cli Installs a Unity Editor and adds modules at install time using the -m flag followed by one or more module IDs. ```bash unity install lts -m ios android webgl ``` -------------------------------- ### Unity CLI modules list example Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Example usage of the modules command to list available modules for a specific Editor version. ```bash modules list ``` -------------------------------- ### unity install with detailed failures and --resume Source: https://docs.unity.com/en-us/unity-cli/release-notes Command whose failures now report the underlying reason instead of a bare 'Installation Failed', and interrupted downloads can be resumed with --resume. ```bash unity install ``` -------------------------------- ### Unity CLI build run example Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Launches the project's most recent recorded build. ```bash build run ``` -------------------------------- ### Install Unity or modules with early elevation Source: https://docs.unity.com/en-us/unity-cli/release-notes Install Unity or additional modules. These commands now request administrator permission at the start of the command instead of partway through. This prevents an unattended install from waiting for a dialog after a long download. If you decline, the command fails immediately with ELEVATION_CANCELLED or ELEVATION_FAILED, and nothing is downloaded or written. ```bash unity install ``` ```bash unity install-modules ``` -------------------------------- ### Install Unity CLI with install script (macOS/Linux) Source: https://docs.unity.com/en-us/unity-cli/use-unity-cli Installs the Unity CLI on macOS or Linux. The script always installs the latest release and checks for glibc 2.34 or newer on Linux before installation. ```bash curl -fsSL https://unity.com/install.sh | bash ``` -------------------------------- ### Unity CLI cloud org create example Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Creates a Unity Cloud organization. ```bash cloud org create ``` -------------------------------- ### Unity CLI install command Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Installs a Unity Editor version, optionally with modules. ```bash install ``` -------------------------------- ### Replace install -v Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Replace 'install -v ' with 'install ' (positional). ```text install -v ``` ```text install ``` -------------------------------- ### Install Editor with module option Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Installs a module by ID. Accepts multiple values, e.g., '-m android' or '-m ios webgl'. ```bash -m android ``` -------------------------------- ### Unity CLI install alias Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Alias for the install command. ```bash i ``` -------------------------------- ### Version control subcommand: vcs setup Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Sets up a project from no version control to its first commit on a remote. Asks only what it can't detect, and prints the equivalent flag command. ```bash vcs setup ``` -------------------------------- ### Install a Unity Editor with unity install Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Installs a Unity Editor version, optionally with modules. The version argument is positional and optional; omitting it opens an interactive prompt on an interactive terminal, but is an error on a non-interactive terminal. ```bash unity install [version] [options] ``` -------------------------------- ### Install Unity CLI via apt repository (Debian/Ubuntu) Source: https://docs.unity.com/en-us/unity-cli/use-unity-cli Registers Unity's apt repository and installs the CLI on Debian or Ubuntu. The unstable suite contains beta releases; GA releases publish to stable. ```bash curl -sL https://hub.unity3d.com/linux/keys/public | sudo gpg --dearmor -o /usr/share/keyrings/Unity_Technologies_ApS.gpg sudo tee /etc/apt/sources.list.d/unity-cli.sources <<'EOF' Types: deb URIs: https://hub.unity3d.com/linux/repos/deb Suites: unstable Components: main Signed-By: /usr/share/keyrings/Unity_Technologies_ApS.gpg EOF sudo apt update && sudo apt install unity-cli ``` -------------------------------- ### Install Unity Editor with version alias or specific version Source: https://docs.unity.com/en-us/unity-cli/use-unity-cli Installs a Unity Editor using either a version alias like 'lts' or a specific version string such as '6000.3.7f1'. The Editor downloads and installs to the configured install path. ```bash unity install lts unity install 6000.3.7f1 ``` -------------------------------- ### Unity CLI assets import example Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Imports a .unitypackage into a project. ```bash assets import ``` -------------------------------- ### Open a project using bare-path syntax Source: https://docs.unity.com/en-us/unity-cli/release-notes Example of bare-path syntax for opening a project without the `open` subcommand. ```bash unity ./MyProject ``` -------------------------------- ### Unity CLI assets inspect example Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Lists the contents of a .unitypackage without importing it. ```bash assets inspect ``` -------------------------------- ### Install Unity CLI with winget (Windows) Source: https://docs.unity.com/en-us/unity-cli/use-unity-cli Installs the Unity CLI via winget on Windows. winget installs an MSIX package, so unity self-update keeps working. ```powershell winget install Unity.CLI ``` -------------------------------- ### Verify Unity CLI installation with unity --version Source: https://docs.unity.com/en-us/unity-cli/use-unity-cli Verifies the Unity CLI is available after installation. If the command isn't found, add the install directory to your shell's PATH or reopen your terminal. ```bash unity --version ``` -------------------------------- ### Install Unity CLI via rpm repository (Fedora/RHEL) Source: https://docs.unity.com/en-us/unity-cli/use-unity-cli Registers Unity's rpm repository and installs the CLI on Fedora or RHEL. The unstable suite contains beta releases; GA releases publish to stable. ```bash sudo tee /etc/yum.repos.d/unity-cli.repo <<'EOF' [unity-cli] name=Unity CLI baseurl=https://hub.unity3d.com/linux/repos/rpm/unstable enabled=1 gpgcheck=1 gpgkey=https://hub.unity3d.com/linux/repos/rpm/unstable/repodata/repomd.xml.key repo_gpgcheck=1 EOF sudo dnf install unity-cli ``` -------------------------------- ### Unity CLI assets export example Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Writes project assets to a .unitypackage. ```bash assets export ``` -------------------------------- ### Install Editor with architecture option Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Selects between Apple silicon and Intel builds on macOS. Use '-a arm64' or '-a x86_64'. ```bash -a arm64 ``` -------------------------------- ### Install Editor with child modules option Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Installs child modules of each selected module (e.g., Android SDK & NDK under 'android'). The '--childModules' option also still works. ```bash --cm ``` -------------------------------- ### Unity CLI install version positional Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference The Unity CLI accepts an optional positional version argument for the 'install' command. ```text [version] ``` -------------------------------- ### Progress output example Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference The Hub CLI outputs plain text progress lines like 'downloading 23.50%'. ```text downloading 23.50% ``` -------------------------------- ### Unity CLI install-path command Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Shows or changes the path where the CLI installs Editors. ```bash install-path ``` -------------------------------- ### Unity CLI watch test example Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Re-runs 'unity test --affected' when files change. ```bash watch test ``` -------------------------------- ### Install Editor with changeset option Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Installs a specific Editor version using a changeset hash, required when the version isn't in the release list. ```bash -c 9b001d489a54 ``` -------------------------------- ### unity hub install on macOS and Linux Source: https://docs.unity.com/en-us/unity-cli/release-notes Command that works again on macOS and Linux, and --hub-version works again for Hub 3.20.0 and newer. ```bash unity hub install ``` -------------------------------- ### Unity CLI install-modules command Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Adds modules to an installed Editor version. ```bash install-modules ``` -------------------------------- ### List and manage Editors Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Commands to inspect available releases, add locally installed Editors, and set the default Editor. ```bash unity editors [options] unity editors add unity editors default [version] ``` -------------------------------- ### Unity CLI modules command Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Lists available modules for an Editor version. Example: 'modules list '. ```bash modules ``` -------------------------------- ### unity install with exit code 7 Source: https://docs.unity.com/en-us/unity-cli/release-notes Command that now distinguishes an unreachable release service from a version that doesn't exist, retrying briefly and exiting with code 7 rather than blaming the version. ```bash unity install ``` -------------------------------- ### Check Unity CLI help Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Run this command to display the authoritative command list for your installed Unity CLI version, including any commands not yet covered in the documentation. ```bash unity --help ``` -------------------------------- ### Save context (unity context save ) Source: https://docs.unity.com/en-us/unity-cli/release-notes Records the current set of account, default organization, default cloud project, default Editor, and install path under a named context. ```text unity context save ``` -------------------------------- ### Set up version control with unity vcs setup Source: https://docs.unity.com/en-us/unity-cli/use-unity-cli Set up version control for a Unity project. The first command runs interactively, detecting available information and asking only for what it can't detect. The second command skips questions in scripted runs using the same --git-* flags as 'unity projects link vcs'. ```bash unity vcs setup ``` ```bash unity vcs setup --vcs github --git-namespace my-org --non-interactive ``` -------------------------------- ### Unity CLI editor module remove example Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Example usage of the editor command to remove installed modules on a specific Editor version. ```bash editor module remove ``` -------------------------------- ### Unity CLI editor command Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Manages a single installation of an Editor version. For example, use 'editor module remove' to remove installed modules on a specific Editor version. ```bash editor ``` -------------------------------- ### Update Unity CLI with self-update Source: https://docs.unity.com/en-us/unity-cli/use-unity-cli Updates the Unity CLI to the latest release. The CLI replaces the current binary with the latest available release. If a download is interrupted, the next run resumes the download instead of starting over. The CLI also checks for updates in the background and prints a notice when a new release is available. To turn the check off, run `unity config update-check off`. `unity upgrade` still works as an alias for `unity self-update`. If you installed the CLI with Homebrew or from the Linux package repositories, update it through that package manager instead; `unity self-update` detects the package-managed install and shows the matching command. A winget install is the exception, since it's an MSIX package, `unity self-update` continues to update it directly. ```bash unity self-update ``` -------------------------------- ### Install modules for an existing Editor with unity install-modules Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Adds one or more modules to an Editor already installed with the Hub or the CLI. You can only add modules to Editors that the Hub or CLI installed; reinstall manually installed Editors through the Hub or CLI to add modules. ```bash unity install-modules [options] ``` -------------------------------- ### Unity CLI build --list-profiles flag Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Flag to list available build profiles. ```bash --list-profiles ``` -------------------------------- ### Verify Editor installation Source: https://docs.unity.com/en-us/unity-cli/release-notes Checks that an installed Editor's binary and modules are present and non-empty, catching installs left broken by antivirus quarantine or failed extraction. ```bash unity editors verify ``` -------------------------------- ### Install and upgrade Unity CLI via Homebrew Source: https://docs.unity.com/en-us/unity-cli/release-notes Installs and updates the Unity CLI on macOS and Linux using Homebrew. Use the install command first, then the upgrade command to stay current. ```bash brew install --cask unity-cli ``` ```bash brew upgrade unity-cli ``` -------------------------------- ### Version control subcommand: vcs merge-setup Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Configures Unity scene and prefab merging (UnityYAMLMerge) for the repository. ```bash vcs merge-setup ``` -------------------------------- ### Open a project with path shorthand Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Opens a project by passing the path directly, omitting the 'open' keyword. ```bash unity open ./MyProject unity ./MyProject # equivalent ``` -------------------------------- ### Add modules to installed Editor with install-modules Source: https://docs.unity.com/en-us/unity-cli/use-unity-cli Adds modules to an already installed Editor. Requires the -e flag for the Editor version and -m for module IDs. Only works for Editors installed through the Hub or CLI. ```bash unity install-modules -e 6000.3.7f1 -m android ios ``` -------------------------------- ### Unity CLI build --list-targets flag Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Flag to list available build targets. ```bash --list-targets ``` -------------------------------- ### Install Unity CLI with Homebrew (macOS/Linux) Source: https://docs.unity.com/en-us/unity-cli/use-unity-cli Installs the Unity CLI via Homebrew on macOS and Linux. The cask supports Apple silicon and Intel on macOS, and x64 and arm64 on Linux. On Linux, installing casks requires Homebrew 6.0 or later. ```bash brew install --cask unity-cli ``` -------------------------------- ### Create a Build Profile (unity build --create-profile ) Source: https://docs.unity.com/en-us/unity-cli/release-notes Creates a Unity 6+ Build Profile asset for a target platform. Requires Unity 6000.0 or later. Exits without building. ```text unity build --create-profile ``` -------------------------------- ### Hub CLI install version flag Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference The Hub CLI requires the '--version' or '-v' flag for the 'install' command. ```text --version ``` ```text -v ``` -------------------------------- ### Open a Unity project Source: https://docs.unity.com/en-us/unity-cli/use-unity-cli Open a Unity project from the terminal. The first command shows the basic usage; the second specifies a project path; the third omits the 'open' keyword when the first argument is a path. ```bash unity open ``` ```bash unity open ./MyProject ``` ```bash unity ./MyProject ``` -------------------------------- ### Install and refresh AI agent skill Source: https://docs.unity.com/en-us/unity-cli/release-notes Installs the Unity CLI agent skill into an AI client's rules or skills directory in that client's native format. The skill is embedded in the binary, works offline, and matches the running version. refresh re-renders previously installed skills after an upgrade. ```bash unity skill install ``` ```bash unity skill refresh ``` -------------------------------- ### Unity CLI license command Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Lists, activates, and returns Unity licenses on this machine. ```bash license ``` -------------------------------- ### npm install command for Unity CLI Source: https://docs.unity.com/en-us/unity-cli/release-notes Command that unity upgrade defers to for npm-managed installs, instead of overwriting them. It defers similarly to apt, rpm, and Homebrew. ```bash npm i -g @unity/cli@latest ``` -------------------------------- ### Version control subcommand: vcs explain Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Explains in plain language what each side of a conflict changed. ```bash vcs explain ``` -------------------------------- ### Unity CLI open command Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Opens a Unity project in a compatible Editor version. ```bash open ``` -------------------------------- ### Unity CLI editors command Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Lists available releases and installed Editors, adds local installs, sets the default Editor, upgrades Editors, lists running instances, and prunes unused or missing Editors. ```bash editors ``` -------------------------------- ### Unity CLI uninstall command Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Removes an installed Editor version. ```bash uninstall ``` -------------------------------- ### Add an Editor Source: https://docs.unity.com/en-us/unity-cli/unity-cli-reference Registers an Editor installed outside the Hub. Accepts one or more paths. ```bash unity editors add /Applications/Unity/Hub/Editor/6000.3.7f1/Unity.app unity editors add "C:\Program Files\Unity\6000.3.7f1" "C:\Program Files\Unity\2022.3.40f1" ```