Package Exports
- @rage-against-the-pixel/unity-cli
- @rage-against-the-pixel/unity-cli/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@rage-against-the-pixel/unity-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
unity-cli
A powerful command line utility for the Unity Game Engine. Automate Unity project setup, editor installation, license management, building, and more—ideal for CI/CD pipelines and developer workflows.
Features
- Install and manage Unity Hub and Unity Editors (multi-platform)
- Activate and return Unity licenses (personal, professional, floating)
- Create new Unity projects from templates
- Run Unity Editor commands and builds from the CLI
- Supports all modules, architectures, and build targets
- Works on Windows, macOS, and Linux
- Designed for automation and CI/CD
Installation
npm install -g @rage-against-the-pixel/unity-cliUsage
In general, the command structure is:
unity-cli [command] [options] <args...>With options always using double dashes (--option) and arguments passed directly to Unity or Unity Hub commands as they normally would with single dashes (-arg). Each option typically has a short alias using a single dash (-o), except for commands where we pass through arguments, as those get confused by the command parser.
Common Commands
Auth
unity-cli license-version: Print the Unity License Client version.unity-cli activate-license [options]: Activate a Unity license.unity-cli return-license [options]: Return a Unity license.
Unity Hub
unity-cli hub-version: Print the Unity Hub version.unity-cli hub-install [options]: Install or update the Unity Hub.unity-cli hub-path: Print the Unity Hub executable path.unity-cli hub [options] <args...>: Run Unity Hub command line arguments (passes args directly to the hub executable).
Unity Editor
unity-cli setup-unity [options]: Find or install the Unity Editor for a project or specific version.unity-cli uninstall-unity [options]: Uninstall a Unity Editor version.unity-cli list-project-templates [options]: List available Unity project templates for an editor.unity-cli create-project [options]: Create a new Unity project from a template.unity-cli open-project [options]: Open a Unity project in the Unity Editor.unity-cli run [options] <args...>: Run Unity Editor command line arguments (passes args directly to the editor).
Unity Package Manager
unity-cli sign-package [options]: Sign a Unity package for distribution.
Run unity-cli --help for a full list of commands and options.
Install Unity Hub and Editor
unity-cli hub-install
unity-cli setup-unity --unity-version 2022.3.x --modules android,iosActivate a Unity License
Supports personal, professional, and floating licenses (using a license server configuration).
unity-cli activate-license --license personal --email <your-email> --password <your-password>Create a New Project from a Template
[!NOTE] Regex patterns are supported for the
--templateoption. For example, to create a 3D project with either the standard or cross-platform template, you can usecom.unity.template.3d(-cross-platform)?.
unity-cli create-project --name "MyGame" --template com.unity.template.3d(-cross-platform)? --unity-editor <path-to-editor>Open a project from the command line
[!TIP] If you run this command in the same directory as your Unity project, you can omit the
--unity-project,--unity-version, and--unity-editoroptions.
unity-cli open-projectBuild a Project
unity-cli run --unity-project <path-to-project> -quit -batchmode -executeMethod StartCommandLineBuildSign a Unity Package
[!NOTE] The
--outputoption is optional. If not specified, the package contents will be updated in place with the signed.attestation.p7mfile. Otherwise a signed.tgzfile will be created in the specified output directory.
unity-cli sign-package --package <path-to-package-folder> --email <your-email> --password <your-password> --organization <your-organization-id>