Documentation

​
​

Development

User Acquisition

Monetization

Industry

Unity command-line interface (CLI)

Download Unity Hub

Unity command-line interface (CLI)

​
​
Unity command-line interface (CLI)
  • Introduction to the Unity CLI
  • Use the Unity CLI
  • Unity CLI reference
  • Replace MCP Server with Unity CLI
  • Unity CLI release notes
  1. Unity command-line interface (CLI)

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 5 minutes
Last updated 18 days ago

Note
The Unity CLI is experimental.
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
-- --headless
syntax, refer to Migrate from the Hub CLI for a comparison of syntax and behavior changes.
Note
To use the Unity CLI to control the Unity Editor, install and set up the Unity Pipeline package. For an example of how you can use the Unity CLI with Unity Pipeline, refer to the Unity CLI introduction video.

Compatibility

The Unity CLI is compatible with the following operating systems:
  • Windows 10 21H1 or newer.
  • Linux RHEL 9 and Ubuntu 22.04 and later. Requires glibc 2.34 or newer. Debian 11, CentOS 8, Amazon Linux 2 aren't supported.
  • macOS 14 and newer.
Note
You can install the Unity CLI on machines that don't run the Unity Hub desktop application, such as headless CI workers. The CLI is also distributed as a Homebrew cask,
.deb
and
.rpm
packages, an AppImage, and an MSIX package on Windows. To learn more, refer to install with winget.

Common 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:
  1. Open a terminal. On Windows, use PowerShell.
  2. 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
unity --version
. If the command isn't found, add the install directory to your shell's
PATH
or reopen your terminal.
On Linux, the script installs the binary to
~/.local/bin/unity
, which is on
PATH
by default on most distributions. Re-running the installer migrates an install from the previous
~/.unity
location.
Note
On Linux the install script and the
.deb
and
.rpm
packages check for glibc 2.34 or newer before installation. This means that an unsupported system uses the CLI it already has and doesn't replace it with one that can't start.

Install 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, run
brew upgrade unity-cli
.
Note
The cask installs the command as
unity
. The cask name is
unity-cli
because
unity
refers to a different package in some package managers.

Install with winget

On Windows, you can install the CLI with winget instead of the install script:
winget install Unity.CLI
To update the CLI, run
winget upgrade Unity.CLI
.
Note
winget shows the four-part package version, such as
1.0.0.20005
, because package versions can't carry a prerelease tag.
unity --version
reports the full version, such as
1.0.0-beta.5
.

Install 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
unstable
suite; general availability (GA) releases publish to
stable
.
To 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
.deb
or
.rpm
package file directly, the package registers the matching repository during installation, so
apt upgrade
or
dnf upgrade
keeps the CLI current from then on.
Note
The package installs the command as
unity
. The package name is
unity-cli
because
unity
refers to a different package on some distributions.

Update the Unity CLI

To update the CLI to the latest release:
  1. Open a terminal.
  2. 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 off
.
If you installed the CLI through a package manager, update it there instead.
unity upgrade
detects a package-managed install and shows the matching command:
sudo 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
On Windows, an MSIX install updates itself:
unity upgrade
applies the update directly, downloading only the parts of the package that changed, and registers the install with Windows so it stays current in the background from then on.
winget upgrade Unity.CLI
continues to work. Rollback isn't available on MSIX installs.
To see what the CLI resolved and which command updates your install, run:
unity diagnose update

Install a Unity Editor

To install a Unity Editor:
  1. Open a terminal.
  2. Run
    unity install
    with the version you want. Use a version alias such as
    lts
    or a specific version string such as
    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
-m
followed by one or more module IDs:
unity 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:
  1. Open a terminal.
  2. Run
    unity install-modules
    with
    -e
    for the Editor version and
    -m
    for the module IDs:
unity install-modules -e 6000.3.7f1 -m android ios
The modules download and install for the specified Editor version.
Important
You can only add modules to Editors installed through the Hub or the CLI. Reinstall manually installed Editors through the Hub or CLI before adding modules.
For all options and module IDs, refer to Unity CLI reference.

Open a project

To open a Unity project:
  1. Open a terminal.
  2. Run
    unity open
    with the path to the project:
unity open ./MyProject
Unity opens the project in the Editor version specified in the project's settings.
You can omit the
open
keyword when the first argument is a path:
unity ./MyProject

Sign in

To sign in to your Unity account:
  1. Open a terminal.
  2. 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
unity auth status
. For all auth commands, refer to Unity CLI reference.

Sign in as a service account

For unattended workflows such as CI pipelines and build agents, you can authenticate with a service account. This is the same service account type used to sign into other Unity services, it isn't specific to the CLI. To learn how to create a service account, refer to Service accounts.
To sign in automatically through the Unity CLI, set the
UNITY_SERVICE_ACCOUNT_ID
and
UNITY_SERVICE_ACCOUNT_SECRET
environment variables to the account's key ID and secret key. For the full list of environment variables, refer to Unity CLI reference.

Copyright © 2026 Unity Technologies
LegalPrivacy PolicyCookiesDocumentation Terms of UseDo Not Sell or Share My Personal InformationYour Privacy Choices (Cookie Settings)

"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S and elsewhere (more info here). Other names or brands are trademarks of their respective owners.

Some pages are machine-translated for convenience, and may contain inaccuracies. In the event of conflicting information, the English version is authoritative.

  • On this page
    • Compatibility

    • Common Unity CLI tasks

    • Install the Unity CLI

      • Install with Homebrew

      • Install with winget

      • Install from the Linux package repositories

    • Update the Unity CLI

    • Install a Unity Editor

    • Add modules to an installed Editor

    • Open a project

    • Sign in

      • Sign in as a service account

  • Additional resources
  • Unity command-line interface (CLI) reference
  • command-line interface (CLI) overview
  • Service accounts