The command line tool to maintain the Unity manifest file for 3rd-party upm registries, offering a similar but lighter experience like npm or yarn for NodeJS.
The tool is designed to work with the OpenUPM registry, but can also work with any upm registries, including the official unity registry.
The command line tool installs the 3rd-party registry as a scoped registry, and maintains the Packages/manifest.json
file when adding/removing packages. If the manifest file is modified, the Unity Package Manager will detect the changes and try to resolve the package dependencies.
Notice: the command line tool does not directly install/uninstall package tarballs, at least for now.
Required nodejs 12, then
npm install -g openupm-cli
If you prefer yarn, then
yarn global add openupm-cli
If npm is not available in your cmd/powershell/git-bash, please configure your environment variables.
# for npm
c:\Program Files\nodejs
# for npm global bin
C:\Users\{yourName}\AppData\Roaming\npm
openupm add <pkg> [otherPkgs..]
openupm add <pkg>@<version>
openupm add <pkg>@[email protected]:...
openupm add <pkg>@https://github.com/...
openupm add <pkg>@file:...
The package itself and all dependencies that exist in the registry will be served by the scope registry.
Notice: openupm will not verify package or resolve dependencies for git, https and file protocol.
openupm remove <pkg> [otherPkgs...]
openupm search <keyword>
If the registry doesn't support the new search endpoint, it will fall back to old /-/all
endpoint. If no package was found, it will search unity official registry instead.
Due to the fact that upstream unity registry doesn't support search endpoint as of December 2019, the search command will only query the current registry.
openupm view <pkg>
open deps <pkg>
Using option --deep
to view dependencies recursively
open deps <pkg> --deep
The cli assumes current working directory (cwd) is the root of an Unity project (the parent of Assets
folder). However you can specify the cwd.
openupm --chdir <unity-project-path>
Specify other 3rd-party registry (defaults to openupm registry)
openupm --registry <registry-url>
i.e.
openupm --registry http://127.0.0.1:4873
Turn off unity official (upstream) registry
openupm --no-upstream ...
Turn on debug logging
openupm --verbose ...
Most commands can fallback to unity upstream registry if necessary, to make it easier to mix official registry with 3rd-party registry. i.e.
$ openupm add com.unity.addressables com.littlebigfun.addressable-importer
added: [email protected] # from unity registry
added: [email protected] # from openupm registry
...