---
title: "Create a Content SDK app locally"
slug: "create-a-content-sdk-app-locally"
abstract: "Create a Content SDK app locally."
---
# 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](https://github.com/Sitecore/xmcloud-starter-js/). The repository contains a starter application and multiple examples following the SitecoreAI project structure.

> [!note]
> **XM Cloud is now SitecoreAI**
> 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:

1. Clone the starter repository using the following command:

    ```text
    git clone https://github.com/Sitecore/xmcloud-starter-js.git
    ```

2. Navigate to the project directory (for example, `kit-nextjs-skate-park`):

    ```text
    cd xmcloud-starter-js/examples/kit-nextjs-skate-park
    ```

    > [!note]
    > We'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) or `examples/basic-spa` (for Angular projects).

3. Run the following command to install the dependencies:

    ```text
    npm install
    ```

Your app is ready to be connected to a SitecoreAI instance. See [Connect your Content SDK app to SitecoreAI](https://doc.sitecore.com/sai/en/developers/content-sdk/20/connect-your-content-sdk-app-to-sitecoreai.html "Connect your Content SDK app to SitecoreAI") for more information.

> [!note]
> 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.

> [!note]
> **XM Cloud is now SitecoreAI**
> 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:

```shell
npx create-content-sdk-app@latest nextjs
```

Using 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](https://doc.sitecore.com/sai/en/developers/sitecoreai/deploy-a-project-and-environment.html#deploy-a-project-with-the-decoupled-deployments-architecture-default) that lives in a dedicated repository, separate from the CM (Content Management) authoring and Docker setup.