Create a SitecoreAI project using the Sitecore CLI
You can create projects, environments, and deployments with the Sitecore CLI commands provided by the XM Cloud plugin. Using the Sitecore CLI instead of the Deploy app for creating the SitecoreAI project is a matter of preference if your project repository is hosted on GitHub, but it is necessary if your organization hosts source-code repositories on other platforms.
Some code examples, images, and UI labels may still use XM Cloud while engineering assets are being updated.
This walkthrough demonstrates using the Sitecore CLI to deploy a Sitecore solution to a SitecoreAI environment.
-
Download .NET 6.0.
-
Prepare your credentials for logging into SitecoreAI.
-
Install the Sitecore CLI version 5.0 or later with the XM Cloud plugin.
This walkthrough describes how to:
SitecoreAI supports decoupled deployments, where authoring and editing hosts run as separate environments. When working with decoupled deployments, you must create and manage multiple environment types and explicitly target the correct environment when deploying changes.
Decoupled deployments are enabled by default for new projects, but you can disable this option during project setup to use the legacy coupled deployment model instead. You can find the option to use the legacy coupled deployments during project creation in the Deploy app.
Optional: Obtain the initial source code
If you do not have a SitecoreAI-compatible solution and do not want to host the source code in a GitHub repository, you can obtain an initial solution by cloning a foundation template.
To obtain the initial source code for your project:
If you use GitHub to host your repositories, the fastest and easiest way to create a project is using the Deploy app. You can then follow the walkthrough to set up your local development environment.
Log in to SitecoreAI
To run CLI commands against the SaaSSitecoreAI platform, you must authorize your device and provide your SitecoreAI credentials. The login process described here performs the necessary device and user authorization and authentication.
You obtain your authentication credentials during the onboarding process.
Create a SitecoreAI project
A project within represents a collection of one or more environments.
Create an environment for the project
A SitecoreAI environment represents a SaaS Sitecore Content Management (CM) tenant along with all the services and supporting tenants for hosting a Sitecore solution. Every environment belongs to a project.
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.
Decoupled architecture
Deploy the solution to the SitecoreAI environment
The SitecoreAI deployment process deploys an image of your solution to a specified environment. It provisions and configures the necessary infrastructure. This section describes using the --upload CLI command.
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:
dotnet sitecore cloud deployment create --environment-id <id> --no-start --no-watch --upload --working-dir <path>Additional steps
After deploying your solution to the SitecoreAI platform, you can continue to develop locally and then deploy customizations to the environment. You can also synchronize items between your local development environment and the SitecoreAI CM instance.
See also how to deploy the client/front-end application.
