Serialization Using Sitecore CLI
Author
Roberto Armas
Date Published

Sitecore’s CLI has become my go-to tool for fast, predictable serialization workflows—especially when working across XM Cloud and local environments. If you’ve ever bounced between environments or needed to keep your YAML clean and consistent, these commands are the ones you’ll rely on daily.
Before you start, make sure your solution includes the following module:
"Sitecore.DevEx.Extensibility.Serialization@6.0.18"
Connecting to a Cloud Environment
Step 1 — Authenticate
dotnet sitecore cloud login
Step 2 — Connect to Your Environment
Replace [Environment ID] with the one from your XM Cloud project:
dotnet sitecore cloud environment connect -id [Environment ID]
Connecting to a Local Environment
If you’re working against a local XM Cloud container instance:
dotnet sitecore connect --ref xmcloud --cm https://xmcloudcm.localhost --allow-write true -n local
Connections are stored in:
.sitecore/user.json
Pulling from Cloud
Pull serialized items from the cloud environment (e.g., dev):
dotnet sitecore ser pull -n "dev"
Pushing to Cloud
Send your changes up to cloud:
dotnet sitecore ser push -n "dev"
Working with Local Serialization
Pull from local:
dotnet sitecore ser pull -n "local"
Push to local:
dotnet sitecore ser push -n "local"
Serialization with the Sitecore CLI is simple, portable, and reliable once you get your workflows down. Whether you’re syncing with cloud, adjusting structure locally, or onboarding a new teammate, these commands will keep everything clean and predictable.
If you'd like, I can also generate SEO meta tags, title, description, and keywords for this post!