# Getting Started

{% hint style="warning" %}
In case you are using `ddev` or `lando` you have to prefix the commands below with it.
{% endhint %}

1. Download and enable the Radix theme:

```bash
composer require 'drupal/radix:^6.0'
```

2. Create a sub-theme using Drush (Considering you are using [drupal/recommended-project](https://github.com/drupal/recommended-project)):

```bash
drush --include="web/themes/contrib/radix" radix:create SUBTHEME_NAME
```

* Note that `SUBTHEME_NAME` is the name of the theme you'll be working with, make sure ideally the name is in lowercase letters.
* Note the path in the `--include` flag, if your Drupal is installed in `web` directory following `core-recommended` project, it's fine, otherwise if you are using anything else like `docroot` change it accordingly.
* Once you've run the `radix:create` command you'd be shown a caveat as shown below that walks you through the next steps:<br>

  <figure><img src="/files/BFBoiiTBEO9zCpYdCDaN" alt=""><figcaption><p>radix:create caveat</p></figcaption></figure>

3. Set the default theme to your newly created theme:

```bash
drush then SUBTHEME_NAME -y; drush config-set system.theme default SUBTHEME_NAME -y
```

4. Go to the newly created theme directory:

```bash
cd web/themes/custom/SUBTHEME_NAME
```

5. Switch to the appropriate node version using `nvm`:

```bash
nvm use
```

* If you don't have the specific node version required by the theme, you'll be shown a message like below:\
  `nvm use Found 'radix/web/themes/custom/SUBTHEME_NAME/.nvmrc' with version <lts/iron> N/A: version "lts/jod -> N/A" is not yet installed.`

  `You need to run nvm install lts/jod to install it before using it.`\
  \
  Run `nvm install lts/jod` to make sure you have the latest LTS version of Node 22 installed.

6. Install the required packages:

```bash
npm install
```

7. At the root of the theme, create a copy of the `.env.example` and rename it to `.env.local`:

```bash
cp .env.example .env.local
```

8. Update the `DRUPAL_BASE_URL` variable in your `.env.local` to point to your localhost address (this file is .gitignored by default to avoid conflicts)\
   \- e.g. `myproject.local` or `myproject.ddev.site`&#x20;
9. For the development phase:

```bash
npm run watch
```

10. For the production phase:

```bash
npm run production
```


---

# 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.trydrupal.com/radix/installation/getting-started.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.
