1. Sitecore Command Line Interface

Deploy your changes to an environment

After you make changes to your locally running content management instance, you can use the Sitecore Command Line Interface (CLI) to upload your changes to an existing SitecoreAI environment.

Decoupled architecture

In decoupled deployments, a SitecoreAI project can contain multiple environments that serve different roles, such as authoring environments and editing hosts. When deploying changes using the CLI, ensure that you target the correct environment for your deployment. Deployments are applied only to the specified environment and are not automatically propagated across environment types.

To deploy and upload your solution to the SitecoreAI environment:

  1. In the project working directory, in a command-line window, run the following command:

    shell
    \# Deploy editing host
    dotnet sitecore cloud editinghost deploy --environment-id ${edtEnvId} --upload
    
    # Deploy authoring environment
    dotnet sitecore cloud deployment create --environment-id ${envId} --upload
  2. When the deployment completes, navigate to the CM instance and review all the artifacts deployed to the targeted environments.

Coupled architecture

Note

Projects built before January 2026 were deployed using the legacy coupled deployment architecture. We recommend you to convert these projects to use the decoupled deployments architecture.

To deploy a legacy coupled architecture and upload your solution to the SitecoreAI environment:

  1. In the project working directory, in a command-line window, run the following command:

    shell
    dotnet sitecore cloud deployment create --environment-id <environment-id> --upload
  2. When the deployment completes, navigate to the CM instance and review all the artifacts deployed to the targeted Environment.

The default value for the --upload command parameter is the current working directory. When providing the argument, everything in the directory is packaged and deployed to SitecoreAI unless specified in a .gitignore file.

To use another folder, use the --upload parameter and provide the path to another directory with the --working-dir (-dir) parameter. For example:

shell
dotnet sitecore cloud deployment create --environment-id <id> --no-start --no-watch --upload --working-dir <path>
If you have suggestions for improving this article, let us know!