Skip to main content

Posts

Showing posts from May, 2022

Sitecore CLI: Extend the Command Line Interface with NuGet

 Sitecore CLI: Extend the Command Line Interface with NuGet Sitecore Command Line Interface (CLI) allows console communication with a Sitecore instance.  Sitecore CLI allows adding commands by writing custom plugins. Sitecore provides some plugins like Publishing and Serialization. The purpose of this blog is to create a simple Sitecore CLI plugin which will print any message which you pass as parameter or print a default message. Sitecore CLI Document Sitecore Command Line Interface Prerequisites .Net Core Code Repository GitHub Usages dotnet sitecore plugin [subcommand] [options] Below are some subcommands: init subcommand add subcommand remove subcommand list subcommand Create a custom CLI plugin command Create a blank new Solution “CustomCLI” in Visual Studio, then add a class library with .Net core 3.1 with the name “CLI.DevEX.Extensibility.Custom”. PackageSources node contains all package sources. Plugin sources need to be specified in Nuget.Config, Local package source ...