Upgrade the Sitecore Command Line Interface to version 5
Sitecore Command Line Interface (CLI) is a tool that you install in PowerShell.
If you do not have a previous installation of the CLI in your project, follow the steps to install Sitecore Command Line Interface instead.
Before you begin
Make sure you are using Sitecore Headless Services version 20.0.2 or higher.
Steps
To upgrade an existing CLI installation:
-
Update the Sitecore Management Services module.
ImportantThis is an important step because starting with version 5.1.25 the CLI has a version compatibility feature that prevents you from running CLI commands with an outdated version of Sitecore Management Services.
-
Update the CLI version:
NoteTo update to the latest available version, you can use the command without providing a version:
dotnet tool update sitecore.cli. -
Update the default plugins:
Alternatively, update or add each plugin manually:
-
If you want to install the Database plugin, run the following command:
-
If you want to install the XM Cloud plugin, run the following command:
-
Check the Sitecore CLI version using the following command:
If your CLI is updated successfully, it returns the version you specified. For example
5.1.25. -
To update the JSON schema, run the following command in your project folder:
-
Check the installed plugins using the following command:
If your CLI plugins are updated successfully, it returns the following message: