1. The CLI cloud command

The cloud editinghost command

Note

To use the editinghost command, you need the Sitecore CLI XM Cloud plugin version 1.1.120 or later.

The editinghost command only works with environments created with cloud environment create --cm-only and environments created using the Decoupled Deployments beta feature.

Note

XM Cloud is now SitecoreAI Some code examples, images, and UI labels may still use XM Cloud while engineering assets are being updated.

The XM Cloud plugin for Sitecore CLI provides the cloud editinghost command to help you manage editing hosts for a given SitecoreAI environment.

Usage

You can use the cloud editinghost command as follows:

shell
dotnet sitecore cloud editinghost [subcommand] [options]

Subcommands

You can use the following subcommands to interact with editing hosts:

  • create - creates an editing host.
  • update - updates the name of an existing editing host.
  • delete - deletes an existing editing host.
  • deploy - creates a new deployment with the specified editing host.

The create subcommand

You can create a new editing host using the create subcommand. You must specify the name of your new editing host and the unique identifier of the authoring environment that you want to link to your editing host.

You can use the following options with the create subcommand:

OptionDescription
--name, -nRequired.The name of the new editing host.
--cm-environment-id, -cmRequired.The unique identifier of the authoring environment that you want to link to your editing host.
--jsonChanges the response format from plain text to JSON.
--configPath to the folder containing the sitecore.json file.Default: the root directory of the Sitecore project solution.
--verbose, -vWrite additional information about the command.
--trace, -tWrite diagnostics and detailed information about the command.
-?, -h, --helpDisplays help and usage information about the command.

For example:

shell
dotnet sitecore cloud editinghost create --cm-environment-id <cm-id> --name "Staging"

The update subcommand

Use the update subcommand to update the name of an existing editing host. You must specify the unique identifier of the editing host and the new name for your editing host.

You can use the following options with the update subcommand:

OptionDescription
--environment-id, -idRequired.The unique identifier for the editing host to update. To find the unique identifier of an editing host, use the cloud environment list command.
--name, -nRequired.The new editing host name.
--jsonChanges the response format from plain text to JSON.
--configPath to the folder containing the sitecore.json file.Default: the root directory of the Sitecore project solution.
--verbose, -vWrite additional information about the command.
--trace, -tWrite diagnostics and detailed information about the command.
-?, -h, --helpDisplay help and usage information about the command.

For example:

shell
dotnet sitecore cloud editinghost update --environment-id <editinghost-id> --name "Staging updated"

The delete subcommand

The delete subcommand permanently deletes an editing host. You must specify the unique identifier of the editing host you want to delete.

You can use the following options with the delete subcommand:

OptionDescription
--environment-id, -idRequired.The unique identifier of the editing host to delete. To find the unique identifier of an editing host, use the cloud environment list command.
--jsonChanges the response format from plain text to JSON.
--configPath to the folder containing the sitecore.json file.Default: the root directory of the Sitecore project solution.
--verbose, -vWrite additional information about the command.
--trace, -tWrite diagnostics and detailed information about the command.
-?, -h, --helpDisplay help and usage information about the command.

For example:

shell
dotnet sitecore cloud editinghost delete --environment-id <editinghost-id>

The deploy subcommand

The deploy subcommand creates and starts a deployment entity for an editing host. You must specify the unique identifier of the editing host.

You can use the following options with the deploy subcommand:

OptionDescription
--environment-id, -idRequired.The unique identifier of the editing host used when establishing a connection.
--upload, -uIf specified, the process uploads the current solution.
--working-dir, -dirIf specified, the process treats the path as the current solution.Default: current solution path.
--no-watchHides the status/progress information during the deployment process. When the deployment finishes, the command instantly detaches.
--no-startWhen used, the deployment entities are created, but the deployment process won't start. You can start the deployment later using the cloud deployment start command.
--timeout, -toThe time in seconds to wait for the creation process to finish.
--jsonChanges the response format from plain text to JSON.
--configPath to the folder containing the sitecore.json file.Default: the root directory of the Sitecore project solution.
--verbose, -vWrite additional information about the command.
--trace, -tWrite diagnostics and detailed information about the command.
-?, -h, --helpDisplay help and usage information about the command.

For example:

shell
dotnet sitecore cloud editinghost deploy --environment-id <editinghost-id>
If you have suggestions for improving this article, let us know!