---
title: "The CLI plugin command"
slug: "the-cli-plugin-command"
abstract: "Describes the DevEx CLI plugin command that manages plugins that contain additional CLI commands."
---
# The CLI plugin command

The [Sitecore CLI](https://doc.sitecore.com/xp/en/developers/101/developer-tools/sitecore-command-line-interface.html "Sitecore Command Line Interface") includes a `plugin` command. This command manages plugins that contain additional CLI commands.

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

## Usage

You can use the command as follows:

```text
dotnet sitecore plugin [subcommand] [options]

```

## Subcommands

You can use the following subcommands:

- The [`init` subcommand](https://doc.sitecore.com/xp/en/developers/101/developer-tools/the-cli-plugin-command.html#UUID-3b17d1fe-de62-f33d-dd4a-438aaa972d11_section-idm4556661697041632789643413451 "The init subcommand") - initializes default plugins. Available starting with *version 4.1.0*
- The [`add` subcommand](https://doc.sitecore.com/xp/en/developers/101/developer-tools/the-cli-plugin-command.html#UUID-3b17d1fe-de62-f33d-dd4a-438aaa972d11_section-idm4609582219889632789664199125 "The add subcommand") - adds or updates a plugin in your project.
- The [`remove` subcommand](https://doc.sitecore.com/xp/en/developers/101/developer-tools/the-cli-plugin-command.html#UUID-3b17d1fe-de62-f33d-dd4a-438aaa972d11_section-idm4556665016846432789669507434 "The remove subcommand") - removes a plugin from your project.
- The [`list` subcommand](https://doc.sitecore.com/xp/en/developers/101/developer-tools/the-cli-plugin-command.html#UUID-3b17d1fe-de62-f33d-dd4a-438aaa972d11_section-idm4612156760819232789675439292 "The list subcommand") - lists all the installed plugins.

<details>
<summary><h3>The init subcommand</h3></summary>

The `init` subcommand initializes default plugins.

You can use the following options with the `init` subcommand:

| Option | Required? | Description |
| --- | --- | --- |
| `-c, --config` | No | The path to the `sitecore.json` configuration file. Default: current working directory. |
| `--version` | No | The version of the default plugins to install. If not specified, the CLI installs the version of the plugin matching the CLI version. |
| `--overwrite` | No | Allow overwriting/updating existing plugins. Plugins that were not installed previously are installed with the latest version or the specified version. |
| `--prerelease` | No | Allow pre-release versions for default plugins. |
| `-v, --verbose` | No | Report additional diagnostic and performance data. |
| `-t, --trace` | No | Report additional diagnostic and performance data |
| `-?, -h, --help` | No | Help for the command. |

The following are examples using the `init` subcommand:

- Command: Result
- `dotnet sitecore plugin init`: Output:NoteIf the default plugins already exist, the CLI displays messages to inform you, for example, You have already installed Sitecore.DevEx.Extensibility.Serialization.

```

Successfully installed version 4.1.0 of plugin Sitecore.DevEx.Extensibility.Serialization
Successfully installed version 4.1.0 of plugin Sitecore.DevEx.Extensibility.Publishing
Successfully installed version 4.1.0 of plugin Sitecore.DevEx.Extensibility.Indexing
Successfully installed version 4.1.0 of plugin Sitecore.DevEx.Extensibility.ResourcePackage

```

- `dotnet sitecore plugin init --version 5.0.0`: Output:

```

Successfully installed version 5.0.0 of plugin Sitecore.DevEx.Extensibility.Serialization
Successfully installed version 5.0.0 of plugin Sitecore.DevEx.Extensibility.Publishing
Successfully installed version 5.0.0 of plugin Sitecore.DevEx.Extensibility.Indexing
Successfully installed version 5.0.0 of plugin Sitecore.DevEx.Extensibility.ResourcePackage

```

- `dotnet sitecore plugin init --version 6.0.0 --overwrite`: Output:

```

Successfully updated to version 6.0.0 of plugin Sitecore.DevEx.Extensibility.Serialization
Successfully updated to version 6.0.0 of plugin Sitecore.DevEx.Extensibility.Publishing
Successfully installed version 6.0.0 of plugin Sitecore.DevEx.Extensibility.Indexing
Successfully installed version 6.0.0 of plugin Sitecore.DevEx.Extensibility.ResourcePackage

```

</details>

<details>
<summary><h3>The add subcommand</h3></summary>

You can use the following options with the `add` subcommand:

| Option | Required? | Description |
| --- | --- | --- |
| `-c, --config` | No | The path to the `sitecore.json` configuration file. Default: current working directory. |
| `-n, --name` | Yes | Name of the plugin to install into the current project. |
| `--version` | No | The version of the plugin to install. If it is not specified, the CLI installs the latest version. |
| `-v, --verbose` | No | Report additional diagnostic and performance data. |
| `-t, --trace` | No | Report additional diagnostic and performance data. |
| `-?, -h, --help` | No | Help for the command. |

The following are examples using the `add` subcommand:

- Command: Result
- `dotnet sitecore plugin add -n Sitecore.DevEx.Extensibility.Serialization`: Output:NoteIf you do not specify the version option, the CLI installs the latest version. If you specify a plugin version higher than the one already installed, the CLI updates it to the newer version.If the package does not exist, the CLI displays a message to inform you.

```text
Successfully installed version 4.0.0 of plugin Sitecore.DevEx.Extensibility.Serialization

```

- `dotnet sitecore plugin add -n Sitecore.DevEx.Extensibility.Serialization --version 4.0.0`: Output:

```text
Successfully installed version 4.0.0 of plugin Sitecore.DevEx.Extensibility.Serialization

```

</details>

<details>
<summary><h3>The remove subcommand</h3></summary>

You can use the following options with the `remove` subcommand:

| Option | Required? | Description |
| --- | --- | --- |
| `-c, --config` | No | The path to the `sitecore.json` configuration file. Default: current working directory. |
| `-n, --name` | Yes | Name of the plugin to install into the current project. |
| `-v, --verbose` | No | Report additional diagnostic and performance data. |
| `-t, --trace` | No | Report additional diagnostic and performance data. |
| `-?, -h, --help` | No | Help for the command. |

The following are examples of using the `remove` subcommand:

- Command: Result
- `dotnet sitecore plugin remove -n Sitecore.DevEx.Extensibility.Serialization`: Output:NoteIf the plugin does not exist, the CLI displays a message to inform you, for example, The plugin Sitecore.DevEx.Extensibility.PluginDoesNotExist does not appear to be installed.

```text
Successfully deleted version 4.0.0 of plugin Sitecore.DevEx.Extensibility.Serialization

```

</details>

<details>
<summary><h3>The list subcommand</h3></summary>

You can use the following options with the `list` subcommand:

| Option | Required? | Description |
| --- | --- | --- |
| `-c, --config` | No | The path to the `sitecore.json` configuration file. Default: current working directory. |
| `-v, --verbose` | No | Report additional diagnostic and performance data. |
| `-t, --trace` | No | Report additional diagnostic and performance data. |
| `-?, -h, --help` | No | Help for the command. |

The following is an example of the `list` subcommand:

- Command: Result
- `dotnet sitecore plugin list`: Output:

```

List of plugins:
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

```

</details>