1. The CLI cloud command

The cloud project command

The XM Cloud plugin for Sitecore CLI provides the cloud project command to help you manage SitecoreAI projects for a given Organization. The command has subcommands for CRUD (create, update, and delete) operations, listing projects, and displaying information about a project.

Usage

You can use the cloud project command as follows:

shell
dotnet sitecore cloud project [subcommand] [options]

Subcommands

You can use the following subcommands to interact with SitecoreAI projects:

  • list - lists all the projects for the authenticated developer.
  • info - displays information about a given project.
  • create - creates a new project.
  • update - updates an existing project.
  • delete - deletes an existing project.

The list subcommand

The list subcommand lists all the projects for the authenticated developer. The command does not require any arguments/options.

You can use the following options with the list subcommand:

OptionDescription
--jsonIf present, changes the response format from plain text to JSON.
--verbose, -vWrite additional information about the command.
--trace, -tWrite diagnostics and detailed information about the command.
-?, -h, --helpDisplay developer help and usage information about the command.

For example:

shell
dotnet sitecore cloud project list

The get subcommand

The get subcommand provides information about a specific SitecoreAI project. You must provide the unique identifier for the project.

You can use the following options with the get subcommand:

OptionDescription
--project-id, -idRequired.The unique identifier for the project.
--verbose, -vWrite additional information about the command.
--trace, -tWrite diagnostics and detailed information about the command.
-?, -h, --helpDisplay developer help and usage information about the command.

For example:

shell
dotnet sitecore cloud project get --project-id <project-id>

The create subcommand

You can create a new project using the create subcommand. You must specify the name of your new project.

You can use the following options with the createsubcommand:

OptionDescription
--name, -nRequired.The name of the new project.
--verbose, -vWrite additional information about the command.
--trace, -tWrite diagnostics and detailed information about the command.
-?, -h, --helpDisplay developer help and usage information about the command.

For example:

shell
dotnet sitecore cloud project create --name "Project name"

The update subcommand

The update subcommand updates an existing project. You must specify the unique identifier for the project and the information to update.

You can use the following options with the update subcommand:

OptionDescription
--project-id, -idRequired.The unique identifier for the project to update.
--name, -nRequired.The new project name.
--verbose, -vWrite additional information about the command.
--trace, -tWrite diagnostics and detailed information about the command.
-?, -h, --helpDisplay developer help and usage information about the command.

For example:

shell
dotnet sitecore cloud project update --project-id <project-id> --name "Updated Name"

The delete subcommand

The delete subcommand removes a project. You must specify the unique identifier for the project.

You can use the following options with the delete subcommand:

OptionDescription
--project-id, -idRequired.The unique identifier for the project to delete.
--verbose, -vWrite additional information about the command.
--trace, -tWrite diagnostics and detailed information about the command.
-?, -h, --helpDisplay developer help and usage information about the command.

For example:

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