Create a Content SDK app locally
When you want to create a Content SDK app locally before connecting it to your SitecoreAI instance, the recommended approach is to use the official XM Cloud starter repository. The repository contains a starter application and multiple examples following the SitecoreAI project structure.
Some code examples, images, and UI labels may still use XM Cloud while engineering assets are being updated.
Use the new starter repository
Content SDK uses a new starter repository containing 2 starter applications and multiple examples.
To create a Content SDK app from the xmcloud-starter-js repository:
-
Clone the starter repository using the following command:
RequestResponsegit clone https://github.com/Sitecore/xmcloud-starter-js.git -
Navigate to the project directory (for example,
kit-nextjs-skate-park):RequestResponsecd xmcloud-starter-js/examples/kit-nextjs-skate-parkNoteWe're using the Skate Park example in the starter repository as it contains a few components out-of-the-box. For a real project, you'll most likely start from an empty project like
examples/basic-nextjs(for Next.js projects) orexamples/basic-spa(for Angular projects). -
Run the following command to install the dependencies:
RequestResponsenpm install
Your app is ready to be connected to a SitecoreAI instance. See Connect your Content SDK app to SitecoreAI for more information.
To use an app with the Deploy app as an editing host, you must update the renderingHosts section of the xmcloud.build.json file.
The starter repository is already configured for use with the Deploy app. The xmcloud.build.json file defines the rendering hosts configuration. If you modify app locations or names, ensure you update the corresponding entries in this configuration file.
Some code examples, images, and UI labels may still use XM Cloud while engineering assets are being updated.
Use the Content SDK CLI
If you prefer to create an empty Content SDK app with minimal Sitecore footprint, you can use the Content SDK CLI:
npx create-content-sdk-app@latest nextjsUsing the CLI, you can create a head application that builds on the starter template allowing you to tailor the app to your own needs while still benefiting from the starter’s structure. You must then add this app to an existing repository.
The CLI can also be used to create a fully decoupled head that lives in a dedicated repository, separate from the CM (Content Management) authoring and Docker setup. This is currently a beta feature in the Deploy app.