Home / Sitecore / Sitecore Command Line Interface and Features | Sitecore Development Services

Sitecore Command Line Interface and Features | Sitecore Development Services

Sitecore Command Line Interface and Features | Sitecore Development Services

Sitecore 10 has released two new modules Sitecore command line interface and Sitecore for Visual Studio for serializing Sitecore contents. It easy to port different Sitecore instances like one dev to another dev/ local/UAT or higher). It provides the ability to login into the remote Sitecore instance, serializes items, and publish, package, and additional commands reference for the command line.

Sitecore Command Line Interface (CLI) is a tool that you install in a terminal and either as a local tool for individual projects or as a global tool for all projects. Sitecore CLI is free and can be accessed via PowerShell whereas Sitecore for Visual studio has plugins, but it requires separate license. To install Sitecore CLI the required version of .NET Core installed in the workstation before installing the Sitecore CLI.

Sitecore has provide publishing and Serialization plugins that can easily install as part of the Sitecore CLI NuGet extensibility release.

Publishing plugin help us to publishes Sitecore Items with configurable options from your local machine to the target database.

serialization plugin help us to serializes, shares, and deploys content items, as well as keeping them in version control.

Serialization

Serialization is a process to collect an item from the Sitecore Content Tree and store as file system to the development team. This ability to synchronize it to another Sitecore instance. So, it’s used to move items from our local environment to any environment. As well as to share items between developers.

Prerequisite to be installed on workstation:
• Sitecore 10/above instance
• Sitecore.ManagementServices package.

To install Sitecore Management Service in CM Download the Sitecore.ManagementServices package file from the Sitecore Downloads site. On the Sitecore Launchpad, click Control Panel, and Install a package. Then follow the Installation Wizard to install the Sitecore.ManagementServices package file.

• .NET Core

The steps here are taken from the Sitecore documentation website which is very easy to follow.

• Make sure you have .NET Core installed, the CLI is a .NET Core CLI Tool
• Open PowerShell session
• cd <project folder>
• dotnet new tool-manifest
• dotnet tool install Sitecore.CLI –add-source https://sitecore.myget.org/F/sc-packages/api/v3/index.json

Sitecore CLI – commands

sitecore login will launch a popup where you can login as a user into the Sitecore environment.
Sitecore init provides your project with some sitecore.json configuration file.
sitecore ser info shows you an overview of all configured module.json files.
sitecore ser watch to automatically serialize changes made in Sitecore to the file system.
sitecore ser push to push your changes to Sitecore.
sitecore ser pull to pull item from Sitecore instance to file system.
sitecore ser diff to check different between two sitecore instance item.
sitecore ser package to check available package commands.

Sitecore Command Line Interface and Features | Sitecore Development Services

Facebooktwittergoogle_pluspinterestlinkedinFacebooktwittergoogle_pluspinterestlinkedin