Repository navigation
unity-cli@v4.0.0 - #86
Open
StephenHodgson wants to merge 52 commits into
Open
StephenHodgson wants to merge 52 commits into
StephenHodgson wants to merge 52 commits into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Serial disclosure and unresolved licensing, editor selection, module installation, and launch regressions block approval.
6 open issues
License status failure falsely reports successful return · New Verbose activation logs unredacted license serial · New Explicit latest CLI version reuses outdated installation · New Unity run adds quit flag to commands that omit it · New Editor lookup ignores requested architecture · New macOS Unity 5.x setup skips requested modules · New
What changed in this PR
Migrates unity-cli v4 from Unity Hub management to a companion for Unity’s official CLI, retaining legacy editor support, licensing fallbacks, Android SDK setup, and annotated Editor logs.
Changes:
- Adds official CLI installation, caching, editor installation, and launch integration.
- Reworks licensing and removes overlapping Hub, project, and package commands.
- Updates migration documentation, tests, dependencies, and CI workflows.
| File | Description |
|---|---|
| tests/upm-cli.test.ts | Removes tests for the retired UPM wrapper. |
| tests/unity-installer-release-api-filter.test.ts | Moves release-filter tests to UnityInstaller. |
| tests/unity-hub.test.ts | Removes Hub integration tests. |
| tests/unity-editor.test.ts | Uses local fixtures and tests launch arguments. |
| tests/unity-cli.test.ts | Adds CLI helpers, licensing fallback, and redaction tests. |
| tests/mocks/electron-asar.js | Removes the obsolete ASAR mock. |
| tests/linux-hub-path.test.ts | Removes Hub path tests. |
| tests/hub-cdn-urls.test.ts | Removes Hub CDN checks. |
| src/upm-cli.ts | Removes the UPM wrapper. |
| src/unity-installer.ts | Adds official CLI and legacy archive installation paths. |
| src/unity-hub.ts | Removes Hub management. |
| src/unity-editor.ts | Integrates official CLI launches with direct-launch fallbacks. |
| src/unity-cli.ts | Adds CLI discovery, downloads, caching, and command execution. |
| src/logging.ts | Adds PATH export support. |
| src/logger-provider.ts | Extends the logger interface for PATH updates. |
| src/license-client.ts | Adds CLI-first licensing, fallback discovery, and redaction. |
| src/index.ts | Exports the new CLI and installer APIs. |
| src/github-actions-ci.ts | Adds PATH exports and environment newline guards. |
| src/cli.ts | Replaces retired commands with the v4 command surface. |
| src/android-sdk.ts | Retries Android SDK package installation. |
| README.md | Documents v4 usage, migration, and maintenance scope. |
| package.json | Sets version 4.0.0 and revises dependencies. |
| package-lock.json | Synchronizes dependency changes. |
| jest.config.mjs | Removes ASAR mock mapping. |
| docs/unity-version-support.md | Replaces Hub-specific wording. |
| .github/workflows/unity-release-discovery.yml | Updates checkout and Node setup actions. |
| .github/workflows/unity-build.yml | Migrates build steps to v4 and official CLI commands. |
| .github/workflows/publish.yml | Updates checkout and Node setup actions. |
| .github/workflows/integration-tests.yml | Updates setup and timeline actions. |
Review effort: Balanced
…file in activate-license
…d drop unity's internal gradle repos on android
…s, and forward the v3 project and uninstall commands to unity
This was
linked to
issues
Oct 26, 2026
…se drift report in the run summary
…eg and pulseaudio
…ild profiles through one file handle
…tor packages, and rerun marked license failures
…mpeg opt-in on linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


unity) and keep only the gaps it lacksUNITY_CLI_PATH/UNITY_CLI_VERSIONso later steps reuse it;--unity-cli-versionon any command orUNITY_CLI_VERSIONpicks a releasesetup-unity: 2017.4+ installs withunity install/unity install-modules, 5.x from Unity's download archive (the CLI misreads 5.x as 5000.x), 4.x with v3's installer; exportsUNITY_CLI_PATHinstead ofUNITY_HUB_PATH--unity-project,setup-unityinstalls modules for the project's saved build profiles;--modules/--build-targetsoverride (closes Install modules based on BuildProfiles in project #68)--license-file/UNITY_LICENSE) first, thenunity license, then v3's licensing client with email/password; credentials can come fromUNITY_USERNAME/UNITY_PASSWORD/UNITY_SERIALlicense-file-pathcommandreturn-license --when auto(default) skips returning a personal or professional license on GitHub-hosted macOS and Linux runners, which share one machine identity across jobs and repos;always/neveroverrideunity-license-exhausted(no free seat) orunity-transient-failure(network/CDN 5xx)runlaunches throughunity runfor 2019.1+ projects, falls back to a direct launch whenunity runrejects an argument, and keeps direct launch for no-project, Android builds, older editors, Linux xvfb and Rosettarunno longer setsUNITY_THISISABUILDMACHINE, which pointed Android Gradle builds at Unity's internal repositoriesinstall-all-tools,hub-install,package-manager-logs,sign-package; no pass-through of unknown commands tounityUNITY_CLI_LINUX_FFMPEG=trueuninstall-unity,list-project-templates,create-projectandopen-projectkeep their v3 options, warn that they are deprecated, and forward tounity uninstall,unity templates list,unity projects createandunity open;create-project --templatetakes a template id or id prefix instead of a regexupm-install,upm-versionandupm-packunchanged from v3unity; checksupm-install/upm-version; 60 minute job cap; matrix values passed through envUNITY_LICENSE_MACOS/UNITY_LICENSE_LINUXsecrets and refresh them withCI_TOKENwhen they expire (never on pull requests); only Windows rows return the license--channel f,b,a)editors: legacy(build-options-legacy.json)npm ciand pinned npm in publish;openupm-cli@4.5.2pinned@electron/asarandtar;yamlmoved to dev deps; commander 15, jest 30.5, ts-jest 29.4.15; brace-expansion override