Upgrade the Sitecore Command Line Interface


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

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 to the latest version:

  1. Update the NuGet source config with the MyGet configuration:

    dotnet nuget add source https://sitecore.myget.org/F/sc-packages/api/v3/index.json -n myget
  2. Upgrade the CLI version, for example, to version 3.0.0:

    dotnet tool install Sitecore.CLI --version 3.0.0 
  3. Install the required Publishing and Serialization plugins:

    dotnet sitecore plugin add -n Sitecore.DevEx.Extensibility.Serialization
    dotnet sitecore plugin add -n Sitecore.DevEx.Extensibility.Publishing


    The Publishing and Serialization commands became separate plugins as part of the Sitecore CLI NuGet extensibility release.

    After you install the plugins, the ser and publish commands are available, and the updated sitecore.json config file from your solution has a new plugins section:

    2  "$schema": "./.sitecore/schemas/RootConfigurationFile.schema.json",
    3  "modules": [
    4    "items/*/*.module.json"
    5  ],
    6  "plugins": [
    7    "Sitecore.DevEx.Extensibility.Publishing@3.0.0",
    8    "Sitecore.DevEx.Extensibility.Serialization@3.0.0"
    9  ],
    10  "serialization": {
    11    "defaultMaxRelativeItemPathLength": 120,
    12    "defaultModuleRelativeSerializationPath": "serialization"
    13  }

    You can check the installed plugins using the dotnet sitecore plugin list command:

    List of plugins:
    Sitecore.DevEx.Extensibility.Publishing v.3.0.0
    Sitecore.DevEx.Extensibility.Serialization v.3.0.0