---
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) 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/104/developer-tools/upgrade-the-sitecore-command-line-interface-to-version-3.html).

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 Core](https://dotnet.microsoft.com/en-us/download/dotnet/6.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:

```

It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '<major.minor>' was not found.

```

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/100/developer-tools/sitecore-management-services.html "Sitecore Management Services").
2. Open a terminal with administrator privileges.
3. Run the following commands to install Sitecore CLI:

    ```shell
    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 only need to run `dotnet tool restore` to install Sitecore CLI.
    >
    > To install the CLI globally, use the `-g` option when running the `install` command (not recommended).

    After the installation has been completed successfully, you will get the following message:

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

    > [!note]
    > The version displayed in the terminal is the latest official release available.

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

    ```shell
    dotnet sitecore init
    ```

5. 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 the following message:

    ```shell
    Required command was not provided.

    Usage:
      sitecore.cli [options] [command]

    Options:
      --version    Display version information

    Commands:
      login                  Authenticates the CLI to a Sitecore instance
      publish                Performs a publish operation on all content
      ser, serialization     Item serialization commands
      init                   Creates Sitecore configurations in the current directory
    ```