Upgrade the Sitecore Command Line Interface to version 3
Sitecore Command Line Interface (CLI) is a tool that you install in PowerShell.
To install a new CLI installation, see Install Sitecore Command Line Interface.
To upgrade an existing CLI installation from version 2.0.0 to version 3.0.0:
-
Update the Sitecore Management Services module.
-
Update the NuGet source config file with the NuGet configuration:
RequestResponsedotnet nuget add source https://nuget.sitecore.com/resources/v3/index.json -n sitecorenuget
-
Upgrade the CLI version to version 3.0.0:
RequestResponsedotnet tool install Sitecore.CLI --version 3.0.0
-
Install the required
Publishing
andSerialization
plugins:RequestResponsedotnet sitecore plugin add -n Sitecore.DevEx.Extensibility.Serialization dotnet sitecore plugin add -n Sitecore.DevEx.Extensibility.Publishing
NoteThe
Publishing
andSerialization
commands became separate plugins as part of the Sitecore CLI NuGet extensibility release.After you install the plugins, the
ser
andpublish
commands are available, and the updatedsitecore.json
config file from your solution has a newplugins
section:RequestResponse{ 2 "$schema": "./.sitecore/schemas/RootConfigurationFile.schema.json", 3 "modules": [ 4 "items/*/*.module.json" 5 ], 6 "plugins": [ 7 "[email protected]", 8 "[email protected]" 9 ], 10 "serialization": { 11 "defaultMaxRelativeItemPathLength": 120, 12 "defaultModuleRelativeSerializationPath": "serialization" 13 } 14}
-
You can check the Sitecore CLI version using the following command:
RequestResponsedotnet sitecore --version
If your CLI is updated successfully, It returns
3.0.0
. -
To update the JSON schema, run the following command in your project folder:
RequestResponsedotnet sitecore init
-
You can check the installed plugins using the following command:
RequestResponsedotnet sitecore plugin list
If your CLI plugins are updated successfully, you will see the following message:
RequestResponseList of plugins: Sitecore.DevEx.Extensibility.Publishing v.3.0.0 Sitecore.DevEx.Extensibility.Serialization v.3.0.0