In this post, we’ll go over the process to install the Sitecore CLI.
Step 1: Install the Sitecore Management Service
In this case, we are installing this in a local Sitecore 10 developer instance.
- Go to https://dev.sitecore.net/Downloads/Sitecore_CLI/2x/Sitecore_CLI_200.aspx
- Choose this option:
- In your Sitecore 10 instance, go to Control Panel –> Administration –> Install a package
- Follow the steps to open and install the package. You must accept the Sitecore License Agreement.
- Package Notes:
“Sitecore Management Services installation.
This package installs the Sitecore Management Services module, for use with the Sitecore CLI.
See the Knowledge Base for Sitecore version compatibility: https://kb.sitecore.net/articles/541788″
What’s Installed?
The package contains files only.
Step 2: Install the Sitecore CLI
The Sitecore CLI can be run as either a global tool or a local project tool. Sitecore recommends installing it as a local project tool, mostly for versioning management. So before you install it, create a new visual studio solution for a new Sitecore 10 project. .net Framework 4.8 is required. https://kb.sitecore.net/articles/087164
- The Sitecore CLI requires .NET Core. Open a command prompt and run “dotnet –list-sdks”. If you see 3.1.x, you are good to go.
- Open powershell as administrator
- Install the CLI by running this script:
cd <project folder> dotnet new tool-manifest dotnet tool install Sitecore.CLI --add-source https://sitecore.myget.org/F/sc-packages/api/v3/index.json
If it installed correctly, it should look like this.
The documentation says to verify it’s installed by typing “sitecore” in the command line but that didn’t work for me. If you read carefully the response after the CLI gets installed, you’ll see is says to use “dotnet tool run sitecore”. This worked for me.
That’s it. The Sitecore CLI is installed.