Plugins
Version: 3.4
A plugin is a library that extends the CLI with additional commands. Plugins are automatically discovered and registered when the application starts. Two search paths for plugins are available:
-
A
plugins
folder within the application directory (next to the binary).-- <parent directory> |-- copyrights |-- plugins | |-- <see directory structure below> |-- ch-cli(.exe) |-- LICENSE.md
-
A
plugins
folder inside the configuration directory in the user profile. -
The environment variable
CH_CLI_PLUGIN_SEARCH_PATHS
can specify one or more search paths, separated by;
or,
.
The file structure within those search directories is fairly flat with a separate subfolder for each plugin:
RequestResponse
-- plugins
|-- Sitecore.CH.Cli.Plugin.Applications
| |-- Sitecore.CH.Cli.Plugin.Applications.dll
|-- Sitecore.CH.Cli.Plugin.Audit
| |-- Sitecore.CH.Cli.Plugin.Audit.dll
|-- <your plugin directory>
|-- <plugin main assembly>.dll
|-- <optional: plugin dependencies>
For a step-by-step explanation of how to create a plugin, see Walkthrough: Creating a simple plugin.