Use the Unity CLI
Install the Unity CLI standalone binary and use it to install Editors, add modules, and open projects from a terminal.
Read time 3 minutesLast updated 3 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.
-- --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 project
Install the Unity CLI
To install the Unity CLI:- Open a terminal.
- 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
unity --versionPATHUpdate the Unity CLI
To update the CLI to the latest release:- Open a terminal.
- Run the self-update command:
The CLI replaces the current binary with the latest available release.unity upgrade
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
The Editor downloads and installs to the configured install path. To add modules at install time, useunity install ltsunity install 6000.3.7f1
-mFor all options, version aliases, and module IDs, refer to Unity CLI reference.unity install lts -m ios android webgl
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
The modules download and install for the specified Editor version.unity install-modules -e 6000.3.7f1 -m android ios
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 opens the project in the Editor version specified in the project's settings. You can omit theunity open ./MyProject
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:
The CLI stores your session so you can use other commands without signing in again. To check whether you're signed in, rununity auth login
unity auth status