Use the Unity command-line interface (CLI)
Install the Unity CLI standalone binary and use it to install Editors, add modules, and open projects from a terminal.
Read time 4 minutesLast updated 6 days ago
Use the Unity CLI to install Unity Editors, add modules, and manage projects from a terminal without the Unity Hub desktop application. The CLI is a standalone binary that works in CI pipelines, automation scripts, and terminal-first workflows.
The Unity CLI works well for:
- Continuous integration (CI) and build agents where installing the full Hub is undesirable.
- Scripting and automation that needs structured output (JSON or TSV) and predictable exit codes.
- Users who prefer a terminal-first workflow for everyday Hub tasks.
For command syntax, options, and flags, refer to Unity CLI reference. If you have existing scripts that use the Hub CLI's syntax, refer to Migrate from the Hub CLI for a comparison of syntax and behavior changes.
-- --headlessCommon Unity CLI tasks
The following commands cover the most common CLI tasks:
unity --help # Top-level helpunity install lts # Install the latest LTS Editorunity install-modules -e 6000.3.7f1 -m ios # Add the iOS moduleunity editors -i # List installed Editorsunity open ./MyProject # Open a projectunity shell # Run many commands in one interactive sessionunity doctor # Print a diagnostic snapshot
Install the Unity CLI
To install the Unity CLI:
- Open a terminal. On Windows, use PowerShell.
- Run the install script for your operating system.
curl -fsSL https://public-cdn.cloud.unity3d.com/hub/prod/cli/install.sh | UNITY_CLI_CHANNEL=beta bash
After the script completes, verify the CLI is available by running . If the command is not found, add the install directory to your shell's or reopen your terminal.
unity --versionPATHOn Linux, the script installs the binary to , which is on by default on most distributions. Re-running the installer migrates an install from the previous location.
~/.local/bin/unityPATH~/.unityInstall with Homebrew
On macOS and Linux, you can install the CLI with Homebrew instead of the install script, so Homebrew keeps it current:
brew install --cask unity-cli
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.
To update the CLI later, run .
brew upgrade unity-cliInstall from the Linux package repositories
On Linux, you can install the CLI from Unity's apt and rpm repositories instead of the install script, so your system package manager keeps it current. Beta releases publish to the suite; general availability (GA) releases publish to .
unstablestableTo register the repository and install the CLI on Debian or Ubuntu:
curl -sL https://hub.unity3d.com/linux/keys/public | sudo gpg --dearmor -o /usr/share/keyrings/Unity_Technologies_ApS.gpgsudo tee /etc/apt/sources.list.d/unity-cli.sources <<'EOF'Types: debURIs: https://hub.unity3d.com/linux/repos/debSuites: unstableComponents: mainSigned-By: /usr/share/keyrings/Unity_Technologies_ApS.gpgEOFsudo apt update && sudo apt install unity-cli
To register the repository and install the CLI on Fedora or RHEL:
sudo tee /etc/yum.repos.d/unity-cli.repo <<'EOF'[unity-cli]name=Unity CLIbaseurl=https://hub.unity3d.com/linux/repos/rpm/unstableenabled=1gpgcheck=1gpgkey=https://hub.unity3d.com/linux/repos/rpm/unstable/repodata/repomd.xml.keyrepo_gpgcheck=1EOFsudo dnf install unity-cli
If you install a release's or package file directly, the package registers the matching repository during installation, so or keeps the CLI current from then on.
.deb.rpmapt upgradednf upgradeUpdate the Unity CLI
To update the CLI to the latest release:
- Open a terminal.
- Run the self-update command:
unity upgrade
The CLI replaces the current binary with the latest available release. 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 offIf you installed the CLI through a package manager, update it there instead. detects a package-managed install and shows the matching command:
unity upgradesudo apt update && sudo apt upgrade unity-cli # Debian and Ubuntu
sudo dnf upgrade unity-cli # Fedora and RHEL
brew upgrade unity-cli # Homebrew on macOS and Linux
Install a Unity Editor
To install a Unity Editor:
- Open a terminal.
- Run with the version you want. Use a version alias such as
unity installor a specific version string such aslts:6000.3.7f1
unity install ltsunity install 6000.3.7f1
The Editor downloads and installs to the configured install path.
To add modules at install time, use followed by one or more module IDs:
-munity install lts -m ios android webgl
For all options, version aliases, and module IDs, refer to Unity CLI reference.
Add modules to an installed Editor
To add modules to an Editor you already installed:
- Open a terminal.
- Run with
unity install-modulesfor the Editor version and-efor the module IDs:-m
unity install-modules -e 6000.3.7f1 -m android ios
The modules download and install for the specified Editor version.
For all options and module IDs, refer to Unity CLI reference.
Open a project
To open a Unity project:
- Open a terminal.
- Run with the path to the project:
unity open
unity open ./MyProject
Unity opens the project in the Editor version specified in the project's settings.
You can omit the keyword when the first argument is a path:
openunity ./MyProject
Sign in
To sign in to your Unity account:
- Open a terminal.
- Run the login command, which opens a browser-based sign-in flow:
unity auth login
The CLI stores your session so you can use other commands without signing in again.
To check whether you're signed in, run . For all auth commands, refer to Unity CLI reference.
unity auth statusWhen you're signed in, you can install the Unity pipeline package to control an editor instance.