---
title: "Before you get started"
slug: "before-you-get-started"
abstract: "Check that you have the necessary Sitecore subscriptions and a compatible app, and prepare your development environment so you can get started with the Cloud SDK."
---
# Before you get started

This topic describes what you need before you get started with the Cloud SDK and how to prepare your development environment.

## Prerequisites

Check that you have the following, before getting started:

> [!note]
> **XM Cloud is now SitecoreAI**
> Some code examples, images, and UI labels may still use XM Cloud while engineering assets are being updated.

- [Sitecore subscriptions](https://doc.sitecore.com/sdk/en/developers/004/cloud-sdk/sitecore-cloud-sdk-for-javascript/cloud-sdk-comparison-charts.html "Cloud SDK comparison charts"), depending on your application requirements.
- [Node.js 18.17](https://nodejs.org/) or later. Check your installed version by using the `node --version` command.
- A Content SDK application based on the [starter kit](https://github.com/Sitecore/content-sdk/tree/dev/packages/create-sitecore-jss/src/templates/nextjs), or a JSS application based on one of the [XM Cloud Front End Application Starter Kits](https://github.com/sitecorelabs/xmcloud-foundation-head). For JSS, the version of your JSS app determines which version of the Cloud SDK to use.

    > [!important]
    > Although this documentation also describes using the Cloud SDK in a *standalone* Next.js application, you need a Content SDK or JSS app connected to SitecoreAI to use the SDK.

### Compatibility with JSS

The version of your JSS app determines which version of the Cloud SDK packages to install.

To make sure you install the correct version of Cloud SDK packages, check the version of the listed Cloud SDK dependencies in the `package.json` file of your JSS app. For example, the [JSS 22.2.0 `package.json` file](https://github.com/Sitecore/jss/blob/v22.2.0/packages/create-sitecore-jss/src/templates/nextjs-xmcloud/package.json) lists the Cloud SDK `core` package version `0.4.0` as a dependency:

```json
"@sitecore-cloudsdk/core": "^0.4.0"
```

In this case, make sure that all other Cloud SDK packages you install are also version `0.4.0`. If you install a previous or later version of a Cloud SDK package, some functionality might not work.

## Prepare your development environment

:::tab{title="JSS-Next.js"}

If you're using a JSS app based on the [XM Cloud Front End Application Starter Kits](https://github.com/sitecorelabs/xmcloud-foundation-head), with [JSS version 21.6](https://github.com/sitecorelabs/xmcloud-foundation-head/blob/main/headapps/nextjs-starter/package.json) or later, then your app is connected to SitecoreAI, and the Cloud SDK is already included in the `nextjs-starter` and the `spa-starters/angular` apps.

To prepare your development environment:

1. [Set up your local development environment](https://doc.sitecore.com/xmc/en/developers/xm-cloud/en/set-up-your-local-development-environment.html) as part of getting started with front-end development in SitecoreAI.

    This involves setting environment variables in the `nextjs-starter` or the `spa-starters/angular` app, for example, [your Context ID and site name](https://doc.sitecore.com/sai/en/developers/jss/22/jss-sai/the-jss-xm-cloud-add-on-for-next-js.html#UUID-97b4d09f-5470-ad6f-5e06-30d41dad6204_section-idm4642926475296034002546447882).

2. [Install and initialize](https://doc.sitecore.com/sdk/en/developers/004/cloud-sdk/install-and-initialize-the-cloud-sdk.html "Install and initialize the Cloud SDK") Cloud SDK packages in your app. All your development work with the Cloud SDK will take place in the `nextjs-starter` or the `spa-starters/angular` app.

:::

### Enable debug logs

During development, we recommend that you enable debug logs for the Cloud SDK. This helps you trace code execution and diagnose errors, speeding up your work with the SDK.

::::tabs
:::tab{title="Browser side"}
To enable logs:

1. In your web browser, navigate to your app.
2. In your web browser's developer tools, in **Local Storage**, create a key called `debug`.
3. For the `debug` key, set `sitecore-cloudsdk:*` as the value.

> [!note]
> Logs related to browser-side SDK code will display in your web browser's developer tools, in the console.

:::
:::tab{title="Server side"}
To enable logs:

- In your source code, in the file where you load environment variables, such as `.env`, add the following key-value pair:

    ```text
    DEBUG=sitecore-cloudsdk:*
    ```

> [!note]
> Logs related to server-side code will display in your terminal.

:::::::
