# Linking a Scandi Theme

## Summary

Before you start:

* [ ] Install Create Scandi App
* [ ] Make sure you have a Scandi theme to use
* [ ] Make sure you have a Create Magento App set up

Linking your theme:

* [ ] Link your app using `run link`
* [ ] Compile your app in Magento mode
* [ ] Enable the theme in the admin panel

## 1. Installing Create ScandiPWA App

Before you link a theme, make sure you have installed Create ScandiPWA App. Use [this guide](https://docs.create-scandipwa-app.com/getting-started/getting-started) for installing it.

## 2. Linking a Theme

{% hint style="danger" %}
Your theme must be located **inside** of your Magento project!
{% endhint %}

To link a ScandiPWA theme to your Create Magento App project you can use the command [link](/getting-started/available-commands/link.md):

```bash
npm run link ./path/to/your/scandipwa-app # for NPM

# or with yarn
yarn run link ./path/to/your/scandipwa-app
```

Create Magento App will link your ScandiPWA theme from your selected path as a symbolic link.

## 3. Run Create ScandiPWA App Compilation

Run the command below from your ScandiPWA App directory (`./path/to/my/scandipwa-app` )

```bash
BUILD_MODE=magento npm run start # Mac, Linux
set BUILD_MODE=magento && npm run start & set BUILD_MODE= # Windows
```

This command will now watch the files and put their compiled versions into the `magento/Magento_Theme` folder.

{% hint style="info" %}
Instead of starting your Create ScandiPWA App project, you can also use `npm run build`.  Learn more [here](https://docs.create-scandipwa-app.com/deploying-your-app/magento-theme#npm-run-build-or-yarn-build).&#x20;
{% endhint %}

## 4. Enable Theme

After you linked theme to your Create Magento App instance you need to activate it.

Go to your Magento Admin panel (by default it can be accessed on `/admin` url), **Content > Configuration**, choose a website that you want to apply theme on, click **Edit** and select your theme, click **Save** and that is it.

Open your store URL and theme should be online.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.create-magento-app.com/usage-guide/themes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
