> For the complete documentation index, see [llms.txt](https://help.brickspacelab.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.brickspacelab.com/slab/getting-started/installing-slab/installing-from-github.md).

# Install from GitHub

## How to install

{% hint style="info" %}
Opt for direct GitHub installation if you're planning to build customizations or want full source control of your theme code.
{% endhint %}

{% hint style="info" %}
Install these tools before you start:

* [Node.js](https://nodejs.org/en/download/) (18+)
* [npm](https://www.npmjs.com/package/npm)
* [Shopify CLI](https://shopify.dev/docs/themes/tools/cli/install) (3+)
  {% endhint %}

{% stepper %}
{% step %}
**Fork the repository**

After purchasing the theme, you'll have GitHub access. On GitHub, fork [`BrickspaceLab/slab`](https://github.com/BrickspaceLab/slab) to your account. Then clone **your fork** (not the upstream repo directly) and add the original repo as `upstream` so you can merge new releases later—see [Pull upstream updates](/slab/advanced-customizations/getting-started/pulling-upstream-updates.md).

```sh
git clone https://github.com/<your-github-username>/slab.git
cd slab
git remote add upstream https://github.com/BrickspaceLab/slab.git
```

{% endstep %}

{% step %}
**Install dependencies**

```sh
npm install
```

{% endstep %}

{% step %}
**Configure environment variables**

Copy the example env file and fill in your values:

```sh
cp .env.example .env
```

Set `STORE_DOMAIN` to your development store domain:

```sh
STORE_DOMAIN=your-store.myshopify.com
```

Optional values:

* Add `STORE_PASSWORD` if the storefront is password-protected.
* Add `SHOPIFY_CLI_THEME_TOKEN` if you want Shopify CLI to authenticate without prompting.
* Add `CORS_ORIGINS` if you preview the theme on a custom domain.
  {% endstep %}

{% step %}
**Start local development**

```sh
npm run dev
```

This runs three parallel processes:

* **Vite dev server** — compiles and hot-reloads CSS and JavaScript
* **Shopify theme dev** — pushes your local files to an **unpublished** development preview on your store, served at `http://127.0.0.1:9292`
* **Section watcher** — compiles `src/sections/` preset JSON files into `sections/`

Your live store is unaffected while you work — `shopify theme dev` creates a separate unpublished copy of the theme. Publish it through the Shopify admin when you are ready to go live.
{% endstep %}

{% step %}
**Activate your license**

When the theme loads in your store for the first time, it will prompt you to enter your license key. Enter the key from your order confirmation or customer portal. This activates and assigns the license to this store.
{% endstep %}

{% step %}
**Optional: add repo secrets for GitHub Actions**

Preview deploys use `STORE_DOMAIN` and `SHOPIFY_CLI_THEME_TOKEN`.

Other CI workflows may also need secrets such as `CURSOR_API_KEY`.
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://help.brickspacelab.com/slab/getting-started/installing-slab/installing-from-github.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
