---
title: "Install Sitecore Command Line Interface"
slug: "install-sitecore-command-line-interface"
abstract: "How to install Sitecore Command Line Interface (CLI) in a terminal."
---
# Install Sitecore Command Line Interface

[Sitecore Command Line Interface (CLI)](https://doc.sitecore.com/xp/en/developers/101/developer-tools/sitecore-command-line-interface.html "Sitecore Command Line Interface") is a tool you install in a terminal.

> [!note]
> To upgrade an existing CLI installation, see [Upgrade Sitecore Command Line Interface](https://doc.sitecore.com/xp/en/developers/101/developer-tools/upgrade-the-sitecore-command-line-interface-to-version-5.html "Upgrade the Sitecore Command Line Interface to version 5").

You can install Sitecore CLI as a local tool for individual projects or a global tool for all projects.

> [!important]
> We do not recommend installing Sitecore CLI as a global tool. Different Sitecore instances might need different versions of the Sitecore CLI.

You must have [.NET 10](https://dotnet.microsoft.com/en-us/download/dotnet/10.0) installed on your workstation before installing the Sitecore CLI. If you do not have the required version of .NET Core installed, you get the following message:

```

Package sitecore.cli {version} is not compatible with netcoreapp3.1 (.NETCoreApp,Version=v3.1) / any. 
Package sitecore.cli {version} supports: net10.0 (.NETCoreApp,Version=v10.0) / any

```

To install Sitecore CLI as a local project tool:

1. If you have not already done so, [install Sitecore Management Services](https://doc.sitecore.com/xp/en/developers/101/developer-tools/sitecore-management-services.html "Sitecore Management Services").

    > [!important]
    > Starting with version 5.1.25, the CLI has a [version compatibility feature](https://doc.sitecore.com/xp/en/developers/101/developer-tools/version-compatibility.html "Version compatibility") that prevents you from running CLI commands with an outdated version of Sitecore Management Services.

2. Open a terminal with administrator privileges.
3. Run the following commands to install Sitecore CLI:

    ```

    cd <project folder>
    dotnet new tool-manifest
    dotnet nuget add source -n Sitecore https://nuget.sitecore.com/resources/v3/index.json
    dotnet tool install Sitecore.CLI
    ```

    > [!note]
    > Other developers working on the same project must only run `dotnet tool restore` to install Sitecore CLI.
    >
    > To install the CLI globally, use the `-g` option when running the `install` command (not recommended).

    When the installation is complete, you get the following message:

    ```

    You can invoke the tool from this directory using the following commands: 'dotnet tool run sitecore' or 'dotnet sitecore'.
    Tool 'sitecore.cli' {version} was successfully installed. Entry is added to the manifest file {project-path}.config\dotnet-tools.json.
    ```

4. To initialize your new project, run the following command in your project folder:

    ```text
    dotnet sitecore init
    ```

    > [!note]
    > The command `dotnet sitecore init` adds default plugins with the same version as the CLI to the `sitecore.json` file. The plugins are `Sitecore.DevEx.Extensibility.Serialization`, `Sitecore.DevEx.Extensibility.Publishing`, `Sitecore.DevEx.Extensibility.Indexing`, `Sitecore.DevEx.Extensibility.ResourcePackage`, and `Sitecore.DevEx.Extensibility.Database`. On the next Sitecore CLI command, the CLI attempts to resolve and install the plugins for you.

5. Verify the initialization on your project with the following command:

    ```text
    dotnet sitecore plugin list
    ```

    If this is the first command after `dotnet sitecore init`, the CLI attempts to resolve and install the plugins listed in the `sitecore.json` file. The command prints a message informing you which plugins are being installed. For example:

    ```text
    >> Begin installing NuGet packages: Sitecore.DevEx.Extensibility.Serialization@{version}, Sitecore.DevEx.Extensibility.Publishing@{version}, Sitecore.DevEx.Extensibility.Indexing@{version}, Sitecore.DevEx.Extensibility.ResourcePackage@{version}, Sitecore.DevEx.Extensibility.Database@{version}
    ```

    If the installation is successful, the command lists the installed plugins and their version information:

    ```

    List of plugins:
    [Installed] Sitecore.DevEx.Extensibility.Serialization v.{version}
    [Installed] Sitecore.DevEx.Extensibility.Publishing v.{version}
    [Installed] Sitecore.DevEx.Extensibility.Indexing v.{version}
    [Installed] Sitecore.DevEx.Extensibility.ResourcePackage v.{version}
    [Installed] Sitecore.DevEx.Extensibility.Database v.{version}
    ```

    If the installation of any plugin fails, the output shows a `[Failed]` status for that plugin.

6. To verify that the Sitecore CLI works, go to your project folder in a terminal and type `dotnet sitecore -h`.

    If the Sitecore CLI is ready, you get a message describing the usage, options, and [available top-level commands](https://doc.sitecore.com/xp/en/developers/101/developer-tools/sitecore-command-line-interface-reference.html "Sitecore Command Line Interface reference"). For example:

    ```

    sitecore.cli
      Sitecore command line tool

    Usage:
      sitecore.cli [options] [command]

    Options:
      --version       Show version information
      -?, -h, --help  Show help and usage information

    Commands:
      login               Authenticates the CLI to a Sitecore instance
      plugin              Manage plugins commands
      init                Creates Sitecore configurations in current directory
      connect             Connect to the existing environment
      ser, serialization  Item serialization commands
      publish             Performs a publish operation on all content
      index               working with indexes data
      itemres             Resource Items Package commands
      dbcleanup           Performs cleanup operations for Sitecore databases
    ```