You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Enhanced error messages to include command output for failed executions
- Added write permission verification before metadata file operations
- Added `hub-install --hub-version <version>` argument to install a specific version of Unity Hub
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.
`hub [options] <args...>`: Run Unity Hub command line arguments (passes args directly to the hub executable).
139
+
140
+
-`<args...>`: Arguments to pass directly to the Unity Hub executable.
141
+
-`--verbose`: Enable verbose output.
71
142
72
-
Supports personal, professional, and floating licenses (using a license server configuration).
143
+
Lists available Unity Hub commands:
73
144
74
145
```bash
75
-
unity-cli activate-license --license personal --email <your-email> --password <your-password>
146
+
unity-cli hub help
76
147
```
77
148
78
-
#### Create a New Project from a Template
149
+
Gets a list of installed editors:
150
+
151
+
```bash
152
+
unity-cli hub editors --installed
153
+
```
154
+
155
+
#### Unity Editor
156
+
157
+
##### Setup Unity Editor
158
+
159
+
`setup-unity [options]`: Find or install the Unity Editor for a project or specific version.
160
+
161
+
-`-p`, `--unity-project <unityProject>` The path to a Unity project or `none` to skip project detection.
162
+
-`-u`, `--unity-version <unityVersion>` The Unity version to get (e.g. `2020.3.1f1`, `2021.x`, `2022.1.*`, `6000`). If specified, it will override the version read from the project.
163
+
-`-c`, `--changeset <changeset>` The Unity changeset to get (e.g. `1234567890ab`).
164
+
-`-a`, `--arch <arch>` The Unity architecture to get (e.g. `x86_64`, `arm64`). Defaults to the architecture of the current process.
165
+
-`-b`, `--build-targets <buildTargets>` The Unity build target to get (e.g. `iOS,Android`).
166
+
-`-m`, `--modules <modules>` The Unity module to get (e.g. ios, android).
167
+
-`-i`, `--install-path <installPath>` The path to install the Unity Editor to. By default, it will be installed to the default Unity Hub location.
168
+
-`--verbose` Enable verbose logging.
169
+
-`--json` Prints the last line of output as JSON string.
170
+
171
+
Installs the latest Unity 6 version with Android and iOS modules:
`uninstall-unity [options]`: Uninstall a Unity Editor version.
180
+
181
+
-`-e`, `--unity-editor <unityEditor>` The path to the Unity Editor executable. If unspecified, `-u`, `--unity-version` or the `UNITY_EDITOR_PATH` environment variable must be set.
182
+
-`-u`, `--unity-version <unityVersion>` The Unity version to get (e.g. `2020.3.1f1`, `2021.x`, `2022.1.*`, `6000`). If unspecified, then `--unity-editor` must be specified.
183
+
-`-c`, `--changeset <changeset>` The Unity changeset to get (e.g. `1234567890ab`).
184
+
-`-a`, `--arch <arch>` The Unity architecture to get (e.g. `x86_64`, `arm64`). Defaults to the architecture of the current process.
185
+
-`--verbose` Enable verbose logging.
186
+
187
+
```bash
188
+
unity-cli uninstall-unity --unity-version 6000
189
+
```
190
+
191
+
##### List Project Templates
79
192
80
193
> [!NOTE]
81
194
> Regex patterns are supported for the `--template` option. For example, to create a 3D project with either the standard or cross-platform template, you can use `com.unity.template.3d(-cross-platform)?`.
82
195
196
+
`list-project-templates [options]`: List available Unity project templates for an editor.
197
+
198
+
-`-e`, `--unity-editor <unityEditor>` The path to the Unity Editor executable. If unspecified, `-u`, `--unity-version` or the `UNITY_EDITOR_PATH` environment variable must be set.
199
+
-`-u`, `--unity-version <unityVersion>` The Unity version to get (e.g. `2020.3.1f1`, `2021.x`, `2022.1.*`, `6000`). If unspecified, then `--unity-editor` must be specified.
200
+
-`-c`, `--changeset <changeset>` The Unity changeset to get (e.g. `1234567890ab`).
201
+
-`-a`, `--arch <arch>` The Unity architecture to get (e.g. `x86_64`, `arm64`). Defaults to the architecture of the current process.
202
+
-`--verbose` Enable verbose logging.
203
+
-`--json` Prints the last line of output as JSON string.
`create-project [options]`: Create a new Unity project from a template.
214
+
215
+
-`-n`, `--name <projectName>` The name of the new Unity project. If unspecified, the project will be created in the specified path or the current working directory.
216
+
-`-p`, `--path <projectPath>` The path to create the new Unity project. If unspecified, the current working directory will be used.
217
+
-`-t`, `--template <projectTemplate>` The name of the template package to use for creating the unity project. Supports regex patterns. (default:
218
+
`com.unity.template.3d(-cross-platform)?`)
219
+
-`-u`, `--unity-version <unityVersion>` The Unity version to get (e.g. `2020.3.1f1`, `2021.x`, `2022.1.*`, `6000`). If unspecified, then `--unity-editor` must be specified.
220
+
-`-e`, `--unity-editor <unityEditor>` The path to the Unity Editor executable. If unspecified, `-u`, `--unity-version`, or the `UNITY_EDITOR_PATH` environment variable must be set.
221
+
-`--verbose` Enable verbose logging.
222
+
-`--json` Prints the last line of output as JSON string.
223
+
224
+
Creates a new Unity project named "MyGame" using the latest version of Unity 6 and the 3D template:
`open-project [options]`: Open a Unity project in the Unity Editor.
233
+
234
+
-`-p`, `--unity-project <unityProject>` The path to a Unity project. If unspecified, the `UNITY_PROJECT_PATH` environment variable or the current working directory will be used.
235
+
-`-u`, `--unity-version <unityVersion>` The Unity version to get (e.g. `2020.3.1f1`, `2021.x`, `2022.1.*`, `6000`). If specified, it will override the version read from the project.
236
+
-`-t`, `--build-target <buildTarget>` The Unity build target to switch the project to (e.g. `StandaloneWindows64`, `StandaloneOSX`, `iOS`, `Android`, etc).
237
+
-`--verbose` Enable verbose logging.
238
+
239
+
Opens a specific Unity project with the latest Unity 6 version:
> If you run this command in the same directory as your Unity project, you can omit the `--unity-project`, `--unity-version`, and `--unity-editor` options.
`run [options] <args...>`: Run Unity Editor command line arguments (passes args directly to the editor).
255
+
256
+
-`--unity-editor <unityEditor>` The path to the Unity Editor executable. If unspecified, `--unity-project` or the `UNITY_EDITOR_PATH` environment variable must be set.
257
+
-`--unity-project <unityProject>` The path to a Unity project. If unspecified, the `UNITY_PROJECT_PATH` environment variable will be used, otherwise no project will be specified.
258
+
-`--log-name <logName>` The name of the log file.
259
+
-`<args...>` Arguments to pass directly to the Unity Editor executable.
260
+
-`--verbose` Enable verbose logging.
97
261
98
262
```bash
99
263
unity-cli run --unity-project <path-to-project> -quit -batchmode -executeMethod StartCommandLineBuild
100
264
```
101
265
102
-
#### Sign a Unity Package
266
+
#### Unity Package Manager
267
+
268
+
##### Sign a Unity Package
269
+
270
+
> [!WARNING]
271
+
> This command feature is in beta and may change in future releases.
272
+
273
+
`sign-package [options]`: Sign a Unity package for distribution.
274
+
275
+
-`--package <package>` Required. The fully qualified path to the folder that contains the package.json file for the package you want to sign. Note: Don’t include package.json in this parameter value.
276
+
-`--output <output>` Optional. The output directory where you want to save the signed tarball file (.tgz). If unspecified, the package contents will be updated in place with the signed .attestation.p7m file.
277
+
-`--email <email>` Email associated with the Unity account. If unspecified, the `UNITY_USERNAME` environment variable will be used.
278
+
-`--password <password>` The password of the Unity account. If unspecified, the `UNITY_PASSWORD` environment variable will be used.
279
+
-`--organization <organization>` The Organization ID you copied from the Unity Cloud Dashboard. If unspecified, the `UNITY_ORGANIZATION_ID` environment variable will be used.
280
+
-`--verbose` Enable verbose logging.
103
281
104
282
> [!NOTE]
105
283
> The `--output` option is optional. If not specified, the package contents will be updated in place with the signed `.attestation.p7m` file. Otherwise a signed `.tgz` file will be created in the specified output directory.
0 commit comments