JSPM

  • Created
  • Published
  • Downloads 1433
  • Score
    100M100P100Q117866F
  • License MIT

A command line utility for the Unity Game Engine.

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

Discord NPM Version NPM Downloads

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-cli

Usage

unity-cli [command] [options]

Common Commands

  • unity-cli hub-install: Install Unity Hub
  • unity-cli hub-version: Print Unity Hub version
  • unity-cli hub-path: Print Unity Hub executable path
  • unity-cli hub [options] <args...>: Run Unity Hub command line arguments
  • unity-cli activate-license [options]: Activate a Unity license
  • unity-cli return-license [options]: Return a Unity license
  • unity-cli license-version: Print Unity License Client version
  • unity-cli setup-unity [options]: Find or install Unity Editor for a project/version
  • unity-cli create-project [options]: Create a new Unity project from a template
  • unity-cli run [options] <args...>: Run Unity Editor Command Line Arguments

Install Unity Hub and Editor

unity-cli hub-install
unity-cli setup-unity --unity-version 2022.3.x --modules android,ios

Activate a Unity License

unity-cli activate-license --email <your-email> --password <your-password> --serial <your-serial>

Create a New Project from a Template

[!NOTE] 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)?.

unity-cli create-project --name "MyGame" --template com.unity.template.3d(-cross-platform)? --unity-editor <path-to-editor>

Build a Project

unity-cli run --unity-editor <path-to-editor> --unity-project <path-to-project> -quit -batchmode -executeMethod StartCommandLineBuild