The CLI serialization command

Version:

The Sitecore serialization plugin includes a ser command. This command handles the serialization of items. To install the serialization plugin, run the following code:

dotnet sitecore plugin add -n Sitecore.DevEx.Extensibility.Serialization

Usage

You can use the command as follows:

dotnet sitecore ser [subcommand] [options]

Subcommands

You can use the following subcommands:

SubcommandDescription
diffCompares the content items of two Sitecore instances.

This command requires elevated permissions in both instances.
explainExplains whether a content item path is included and why.
infoShows serialization configuration information.
packageLists serialization package commands.
package createCreates a package of serialized content items.
package installInstalls a package of serialized content items in a Sitecore instance.

This command requires elevated permissions.
pullSerializes content items from a Sitecore instance to your file system.

This command requires elevated permissions.
pushPushes serialized content items from your file system to a Sitecore instance.

This command requires elevated permissions.
validateChecks serialized content items for validity. Can fix common issues with the --fix argument.
Note

For more information, see

Validate serialized content items.
watchMonitors changes to content items in a Sitecore instance and automatically serializes the changes to your file system.

This command requires elevated permissions.

Options

You can use the following options with the pull and push subcommands:

OptionsRequired?Description
--what-ifNoSimulate what content changes you are going to make before you actually make them.
Note

For more information on the

--what-if option, see the video Sitecore CLI and the 'what-if' flag.
If you have suggestions for improving this article, let us know!