Show Menu
Cheatography

Sitecore XM Cloud CLI Commands List Cheat Sheet by

Sitecore CM Cloud CLI Commands List. To contribute, please reach out. https://www.linkedin.com/in/nehemiahj/

Sitecore CLI and Plugin Instal­lation

Create­/Na­vigate Project Folder
cd <project folder>
Create DotNet Tool Manifest
dotnet new tool-manifest
Add Nuget Source
dotnet nuget add source -n Sitecore https://nuget.sitecore.com/resources/v3/index.json
Install Siteco­re.CLI Tool
dotnet tool install Sitecore.CLI
To initialize New Project
dotnet sitecore init
Install the XM Cloud plugin (Requires Sitecore CLI version 5.0.0 and later)
dotnet sitecore plugin add -n Sitecore.DevEx.Extensibility.XMCloud
To view plugins instal­led­/in­iti­alized
dotnet sitecore plugin list
Installing Sitecore CLI

XM Cloud Plugin Commands

List of all the commands, subcom­mands.
Login
intera­ctive
For intera­ctive user login using a device code authen­tic­ation flow
dotnet sitecore cloud login
Login
non-in­ter­active
For non-in­ter­active client logins using client credential flows
dotnet sitecore cloud login --client-credentials --client-id <clientId> --client-secret <clientSecret>
Logout
logout
To log out of an XM Cloud enviro­nment
dotnet sitecore cloud logout
Organi­zation
info
To show inform­ation about the current user's organi­zation
dotnet sitecore cloud organization info --organization-id <id>
Organi­zation
health
To provide inform­ation about the status of the organi­zat­ion's resources.
dotnet sitecore cloud organization health --organization-id <id>
Organi­zation
license
To download your organi­zat­ion's license file using the license subcommand
dotnet sitecore cloud organization license --organization-id <id>
Project
list
To get the list of all XM Cloud Projects
dotnet sitecore cloud project list
Project
info
To get inform­ation about an XM Cloud Project
dotnet sitecore cloud project info --project-id <project-id>
Project
create
To create an XM Cloud Project
dotnet sitecore cloud project create --name "Project name"
Project
update
To update the name of the XM Cloud Project
dotnet sitecore cloud project update --project-id <project-id> --name "Updated Name"
Project
delete
To remove an XM Cloud project
dotnet sitecore cloud project delete --project-id <project-id>
Enviro­nment
list
To list all the XM Cloud enviro­nments for a project
dotnet sitecore cloud environment list --project-id <project ID>
Enviro­nment
info
To get inform­ation about an XM Cloud Enviro­nment
dotnet sitecore cloud environment info --environment-id <environment-id>
Enviro­nment
create
To create a new XM Cloud enviro­nment
dotnet sitecore cloud environment create --name "Staging" --project-id <project-id>
Enviro­nment
update
To update an existing XM Cloud enviro­nment
dotnet sitecore cloud environment update --environment-id <env-id> --name "Updated Name"
Enviro­nment
delete
To remove an XM Cloud enviro­nment
dotnet sitecore cloud environment delete --environment-id <environment-id>
Enviro­nment
connect
To connect your Sitecore solution to an existing enviro­nment
dotnet sitecore cloud environment connect --environment-id <environment-id>
Enviro­nment
disconnect
To disconnect your Sitecore solution from an existing enviro­nment
sitecore cloud environment disconnect --environment-id <environment-id>
Enviro­nment
promote
To promote an existing deployment into a specific enviro­nment
sitecore cloud environment promote --environment-id <environment-id> --source-id <deployment-id>
Enviro­nment
log list
To list the log file names from the deployment
dotnet sitecore cloud environment log list --environment-id <env-id>
Enviro­nment
log download
To download and save the content of the specified log file
dotnet sitecore cloud environment log download --environment-id <env-id> --logfile <logfile>
Enviro­nment
log view
To download and print the content of the specified log file to the console
dotnet sitecore cloud environment log view --environment-id <env-id> --logfile <logfile>
Enviro­nment
health
To display the health status of an enviro­nment's resources
dotnet sitecore cloud environment health --environment-id <environment-id>
Enviro­nment
variable list
To list all the enviro­nment variables for an XM Cloud enviro­nment
dotnet sitecore cloud environment variable list --environment-id <environment-id>
Enviro­nment
variable upsert
To create or update enviro­nment variables for an XM Cloud enviro­nment
dotnet sitecore cloud environment variable upsert --environment-id env1 --name testvar --value testval --target CM 'testvar'
Enviro­nment
variable delete
To delete the specified enviro­nment variable from an XM Cloud enviro­nment
dotnet sitecore cloud environment variable delete --environment-id env1 --name testvar 'testvar'
Enviro­nment
restart
To restart the authoring enviro­nment without downtime.
dotnet sitecore cloud environment restart --environment-id <environment-id>
Deployment
create
To create and start a deployment entity for an XM Cloud enviro­nment
dotnet sitecore cloud deployment create --environment-id <id> --no-start --no-watch --upload --working-dir <path>
Deployment
info
To get inform­ation about a specific XM Cloud deployment
dotnet sitecore cloud deployment get --deployment-id <id>
Deployment
list
To list the most recent deploy­ments for an enviro­nment
dotnet sitecore cloud deployment list --environment-id <id>
Deployment
start
To start the execution of a deployment
dotnet sitecore cloud deployment start --deployment-id <id> --no-watch
Deployment
watch
To show inform­ation about the deployment status­/pr­ogress
dotnet sitecore cloud deployment watch --deployment-id <id>
Deployment
log
To show or download logs about a specific deployment
dotnet sitecore cloud deployment log --deployment-id <id> --output <path>
   
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          Android Package Manager (pm) Cheat Sheet
          Basic Cisco IOS Commands Cheat Sheet
          Sitecore XM Cloud CLI Cheat Sheet

          More Cheat Sheets by nehem87

          Sitecore XM Cloud CLI Cheat Sheet