Upgrade the Sitecore Command Line Interface to version 4
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 3.0.0 to version 4.0.0:
-
Update the Sitecore Management Services module.
-
Update the CLI version to version 4.0.0:
RequestResponsedotnet tool update sitecore.cli --version 4.0.0
-
Update the publishing and serialization plugins:
NoteIf you update to version 4.1.0, you can use the new CLI command
dotnet sitecore plugin init
to update default plugins to version 4.1.0.RequestResponsedotnet sitecore plugin add -n Sitecore.DevEx.Extensibility.Serialization --version 4.0.0 dotnet sitecore plugin add -n Sitecore.DevEx.Extensibility.Publishing --version 4.0.0
-
If you need to install the indexing plugin, then run the following command:
RequestResponsedotnet sitecore plugin add -n Sitecore.DevEx.Extensibility.Indexing --version 4.0.0
-
If you need to install the Items as Resources plugin, then run the following command:
RequestResponsedotnet sitecore plugin add -n Sitecore.DevEx.Extensibility.ResourcePackage --version 4.0.0
-
Check the Sitecore CLI version using the following command:
RequestResponsedotnet sitecore --version
If your CLI is updated successfully, it returns
4.0.0
. -
To update the JSON schema, run the following command in your project folder:
RequestResponsedotnet sitecore init
-
Check the installed plugins using the following command:
RequestResponsedotnet sitecore plugin list
If your CLI plugins are updated successfully, it returns the following message:
RequestResponseSitecore.DevEx.Extensibility.Indexing v.4.0.0 Sitecore.DevEx.Extensibility.Publishing v.4.0.0 Sitecore.DevEx.Extensibility.ResourcePackage v.4.0.0 Sitecore.DevEx.Extensibility.Serialization v.4.0.0