This Official VRChat CLI Tool enables advanced creators to manage their packages, projects, dependencies and more from the command line. Full documentation available at https://vcc.docs.vrchat.com/vpm/cli
$ dotnet add package VRChat.VPM.CLIThe VRChat Package Manager is available as a Command Line Interface application, for advanced users and automation.
You'll need the .NET 8 SDK installed. Then just open a terminal and type:
dotnet tool install --global vrchat.vpm.cli
This will make it available at any command prompt just by typing vpm! You need the latest templates to make/migrate projects, so a great first thing to run is vpm install templates - more on that in the install templates section.
You can always update the tool to the latest version with the command:
dotnet tool update --global vrchat.vpm.cli
You can uninstall it with the command:
dotnet tool uninstall --global vrchat.vpm.cli
To learn more about what's going on, read the .NET Tool Docs.
VRChat Projects are Unity projects which have the VRChat SDK in them.
Creates a new VRChat project from a template
vpm new <projectName> [template] [-p path]
Arguments
projectName: The name for the new project. Will have numbers added to it if another project already exists with this name in the target directory.
template: Optional template to use. If you don't provide one, the barebones "Base" template will be used, which includes only the VRChat Base SDK package. You can use the name of one of the built-in templates, or provide an absolute path to your own template. built-in templates: "Base", "World", "Avatar", "UdonSharp"
path: Optional absolute path to use when creating the project. If not provided, the current directory will be used.
Adds a project to the list of projects in the CreatorCompanion. This will allow you to open the project from the CreatorCompanion GUI and will show it in the list of projects in the CLI.
vpm add project <project>
Arguments
Removes a project from the list of projects in the CreatorCompanion
vpm remove project <project>Arguments
Lists all the projects and their Unity Versions saved in the CreatorCompanion
vpm list projectsChecks whether a given name or path points to a compatible VRChat project.
vpm check project [<name>]Arguments
userProjectsIf the project is found, its type will be printed to the console.
Returns a 0 if a project is found, and a 1 if it is not.
Restores all VPM packages specified in the project's vpm-manifest.json file, and deletes any LegacyPackages accidentally left in the project. This is done automatically by the Resolver when you open a project in Unity, but you can also do it manually with this command.
vpm resolve project [<name>]Arguments
If the project is found, its packages will be restored.
Returns a 0 if the packages were successfully restored, and a 1 if they were not.
Migrates projects created with the legacy .unitypackage SDKs to the new system if they use the SDK3 Worlds or Avatars unitypackages (SDK2 not supported). They can be Unity 2017, 2018 or 2019 projects. Will also migrate UdonSharp and CyanEmu to the new package-based versions.
vpm migrate legacy [projectPath]Arguments
Options
If the project is found and it can be migrated it will be automatically upgraded to the new system.
Returns a 0 if a project is found and it can be migrated, and a 1 if it is not found or can't be migrated.
Migrates projects using Unity 2019 to Unity 2022. When the migration is done - you will need to open the project with Unity 2022 to finalize the migration.
vpm migrate 2022 [projectPath]Arguments
Options
Returns a 0 if a project is found and it can be migrated, and a 1 if it is not found or migration is not possible / failed.
Packages are code and assets in a portable format, stored in in zip files and pulled into your project by the VRChat Package Manager.
Reports the info from a package, or tells if you if it is not found/invalid.
vpm check package <name>Arguments
com.vrchat.worlds or com.vrchat.udonsharp, or it can be a relative or absolute path to a local package.Examples
vpm check package com.vrchat.avatars
vpm check package "C:/MyPackages/MirrorExploder"
Adds a VPM package to an existing Project
vpm add package <packageName> [-p <project>]Arguments
com.vrchat.worlds or com.vrchat.udonsharp, or it can be a relative or absolute path to a local package.
com.vrchat.worlds@3.4.1Options
userProjects list.Examples
vpm add package com.vrchat.avatars
vpm add package "C:/MyPackages/MirrorExploder" "../MyProjectDir"
Removes a VPM package from an existing Project
vpm remove package <packageName> [-p <project>] [-f]Arguments
Options
-p|--project: Specifies the project from which the package will be removed If no argument is provided, the method will look in the current directory. If provided, the value can be an absolute or relative path to a Unity Project.
-f|--force: Removes a package even if doing so might break the project.
Examples
vpm remove package com.vrchat.clientsim
vpm remove package "com.vrchat.base" "../MyProjectDir" -f
Templates are barebones VRChat projects which can be used as a starting point for new projects, pulling in your favorite packages, prefabs and tools to get running quickly.
:::tip
We also provide the templates as git repositories you can use directly. Here's the guide with all the links and instructions.
:::
Installs the latest version of the VRChat templates to AppData/Local/VRChatCreatorCompanion/VRCTemplates, overwriting files that are there. Useful if you're using the CLI without having installed the VCC GUI.
vpm install templatesNote that this will clear out the existing template first - user templates should be put into AppData/Local/VRChatCreatorCompanion/Templates instead.
Prints out the names and paths of the Official VRChat Templates, and the paths of the installed User Templates.
vpm list templatesReports the version from a template, or tells if you if it is not found/invalid.
vpm check template <template>Arguments
built-in templates: "Base", "World", "Avatar", "UdonSharp"
Repos are listings of Packages. You always have access to the Official and Curated repos, and you can add your own Community repos.
Lists all the sources available for loading packages. This includes the Official and Curated package listing, as well as any User repos add to the Settings.
vpm list reposAdds a local or remote repo of packages.
vpm add repo <path> [--headers key:value key:value]Arguments
Options
<name>:<value>. It should be noted that if the value has a space in it, wrap the header in quotes.vpm add repo https://test.com/index.json --headers "Authorization:Bearer my_token"Adds a repo found at https://test.com/index.json and will send along the Authorization header whenever it requests the listing.
vpm add repo https://test.com/index.json -h "Authorization:Bearer my_token" Accept:text/htmlAdds a repo found at https://test.com/index.json and will send along the Authorization and Accept headers whenever it requests the listing.
Returns 0 if the repo was added and 1 if it was not.
Create a new json file for a package listing.
vpm new repo [path] [--name MyName] [--author email@domain.com]** Arguments**
4d6ffbe7-fe91-449f-ae7e-c8688e315a83.json.Options
Removes the repo from your settings by id. Returns 0 if the repo was removed and 1 if it was not.
If the repo listing did not provide an explicit id - a url can be used in its place.
vpm remove repo [id]Removes all the repos from your settings. Returns 0 if the repos were removed and 1 if they weren't.
vpm remove reposThe VCC and VPM require a few things to be installed in order to run properly. These commands can help you quickly get your machine or a cloud build set up.
On Windows, checks if there is a registry key for the Unity Hub at HKEY_LOCAL_MACHINE\SOFTWARE\Classes\unityhub\DefaultIcon.
On Mac, checks if there is a file at /Applications/Unity Hub.app/Contents/MacOS/Unity Hub.
vpm check hubReturns 0 if it is found and 1 if it is not.
Installs Unity Hub 3.0 for Windows
vpm install hubSpecifically, it downloads the hub installer from
https://public-cdn.cloud.unity3d.com/hub/prod/UnityHubSetup.exeand runs it with the argument /S to install silently.
Returns 0 if the Hub was installed and 1 if it was not.
Checks if there is a valid installation of Unity installed at the path specified in the Settings as pathToUnityExe. If the Unity Hub is installed, runs the hub in a background process to list any Unity Editors using the args:
-- --headless editors -iUpdates the Settings with the paths to the Unity Editors if found.
vpm check unityReturns 0 if a compatible version of Unity is specified there and 1 if it is not.
Installs a compatible version of the Unity Editor for Windows with Android Build Support
vpm install unitySpecifically, it runs the Unity Hub with these args:
-- --headless install -v 2022.3.22f1 -c b9e6e7e9fa2d -m androidreturns 0 if Unity was installed and 1 if it was not.
Lists the Unity Editors found on the current system.
vpm list unityChecks:
-- --headless editors -iOpens the folder where the settings file is stored.
vpm open settingsFolderOpens the default project creation folder
vpm open projectsFolderOpens the folder where backups are stored
vpm open backupsFolderThe only fully-supported platform at the moment is Windows 10. However, we are working to make the vpm tool available to Mac and Linux users.
:::tip
If you're having trouble using the CLI on non-Windows platforms, you can check out our Project Templates to get you started with the latest VRChat packages without relying on VCC.
:::
/Applications/Unity Hub.app/Contents/MacOS/Unity Hub. If this is not the case, you'll need to open your settings file and set the pathToUnityHub to the correct absolute path manually. Make sure to target the executable inside of the UnityHub.app as shown in the default path.That's it! You should be able to make new projects from templates, add packages to projects and most other functions. You can file a Canny for any methods that don't work.
The system is completely untested on Linux distributions at this point, but may work anyway due to the work done for the Mac version. The VPM will not be able to find your Unity Hub or Unity Editor paths however, so you'll need to update your settings.json file to set them manually for now.