Upgrade the Sitecore Command Line Interface to version 5

Sitecore Command Line Interface (CLI) is a tool that you install in PowerShell.

Note

If you do not have a previous installation of the CLI in your project, follow the steps to install Sitecore Command Line Interface instead.

To upgrade an existing CLI installation from version 4.0.0 to version 5.0.0:

  1. Update the Sitecore Management Services module.

  2. Update the CLI version to version 5.0.0:

    RequestResponse
    dotnet tool update sitecore.cli --version 5.0.0
    Note

    To update to the latest available version, you can use the command without providing a version: dotnet tool update sitecore.cli.

  3. Remove old plugins from the sitecore.json file plugins property.

  4. Update the default plugins:

    RequestResponse
    dotnet sitecore plugin init
  5. If you want to install the XM Cloud plugin, run the following command:

    RequestResponse
    dotnet sitecore plugin add -n Sitecore.DevEx.Extensibility.XMCloud
  6. Check the Sitecore CLI version using the following command:

    RequestResponse
    dotnet sitecore --version

    If your CLI is updated successfully, it returns 5.0.0.

  7. To update the JSON schema, run the following command in your project folder:

    RequestResponse
    dotnet sitecore init
  8. Check the installed plugins using the following command:

    RequestResponse
    dotnet sitecore plugin list

    If your CLI plugins are updated successfully, it returns the following message:

    RequestResponse
    Sitecore.DevEx.Extensibility.Database v.5.0.0
    Sitecore.DevEx.Extensibility.Indexing v.5.0.0
    Sitecore.DevEx.Extensibility.Publishing v.5.0.0
    Sitecore.DevEx.Extensibility.ResourcePackage v.5.0.0
    Sitecore.DevEx.Extensibility.Serialization v.5.0.0

Do you have some feedback for us?

If you have suggestions for improving this article,