Upgrade the Sitecore Command Line Interface to version 4

Abstract

How to upgrade the Sitecore Command Line Interface (CLI) to version 4.0.0 in PowerShell.

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

Note

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:

  1. Update the Sitecore Management Services module.

  2. Update the CLI version to version 4.0.0:

    dotnet tool update sitecore.cli --version 4.0.0
  3. Update the required publishing and serialization plugins:

    dotnet 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
  4. If you need to install the indexing plugin, then run the following command:

    dotnet sitecore plugin add -n Sitecore.DevEx.Extensibility.Indexing --version 4.0.0
  5. If you need to install the Items as Resources plugin, then run the following command:

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

    dotnet sitecore --version

    If your CLI is updated successfully, it returns 4.0.0.

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

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

    dotnet sitecore plugin list
    

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

    Sitecore.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