> ## Documentation Index
> Fetch the complete documentation index at: https://weaverse.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Weaverse component configuration uses `settings`. `inspector` is deprecated; never generate it.
> Weaverse Hydrogen themes use React Router v7: import from `react-router`, never `react-router-dom` or `@remix-run/*`.
> Before using any code sample, read `@weaverse/hydrogen` in the project's `package.json`: 6.x and 5.x import from different entries and use different type names, so code for one does not build on the other.
> `@weaverse/hydrogen` 6 (Shopify Hydrogen 2026.10 and later, the version these docs show) imports from `@weaverse/hydrogen/react-router` and uses `Weaverse*` types such as `WeaverseComponentProps`, `WeaverseComponentLoaderArgs` and `WeaverseComponentSchema`; the root `@weaverse/hydrogen` entry only exports `createSchema()`, data helpers and types.
> `@weaverse/hydrogen` 5.x (Hydrogen 2026.4 and earlier) imports everything from `@weaverse/hydrogen` and uses `HydrogenComponentProps`, `ComponentLoaderArgs` and `HydrogenComponentSchema`. On a 5.x project, convert samples to these names. Upgrade to 6 only when asked (`npx @weaverse/cli@latest migrate v6`, plus the Hydrogen 2026.10 upgrade). Do not mix major versions.
> Next.js themes use `@weaverse/hydrogen` 6.2.0 or later: import client and shared code from `@weaverse/hydrogen/next` and server-only code from `@weaverse/hydrogen/next/server`. `@weaverse/next` is deprecated; never install or import it.
> For live project data (pages, theme settings, translations), use the Weaverse MCP server: https://weaverse.io/docs/developer-tools/weaverse-mcp

# Installation

> Install Weaverse for your Shopify Hydrogen project using our app-based workflow or manual methods.

# Installation

Get Weaverse installed and running in your Shopify Hydrogen project quickly and easily.

> **🚀 New to Weaverse?** Try our [5-Minute Quickstart](https://weaverse.io/docs/intro/quickstart.md) for the fastest setup experience.

> [!NOTE]
>
> This page covers Shopify Hydrogen storefronts on React Router. To add Weaverse to a Hydrogen storefront on the Next.js App Router, see the [Next.js quickstart](https://weaverse.io/docs/nextjs/quickstart.md).

## Prerequisites

* **Node.js 22.18+ or 24.11+** - [Download here](https://nodejs.org/)
* **A Shopify store** - Development store or paid plan
* **Basic terminal knowledge** - For running commands

## Installation Methods

### Method A: Via Weaverse App (Recommended)

**Best for**: New users, quick setup, guided experience

1. **Install Weaverse App**: Visit [https://apps.shopify.com/weaverse](https://apps.shopify.com/weaverse)
2. **Create Project**: Open app → "Get Started" → Choose theme (Pilot recommended)
3. **Run Generated Command**: Copy and run the custom CLI command provided

Example command:

```bash theme={null}
npx @weaverse/cli@latest create --template=pilot --project-id=abc123 --project-name=my-store
```

An interactive terminal asks whether to start the development server. A non-interactive run starts it only with `--dev`. For a deterministic next step, run:

```bash theme={null}
cd my-store && npm run dev
```

***

### Method B: Direct CLI Installation

If you have a Weaverse Project ID:

```bash theme={null}
# Create project
npx @weaverse/cli@latest create --template=pilot --project-id=your-project-id --project-name=my-store

# Start development
cd my-store && npm run dev
```

**Available templates**: `pilot`, `naturelle`, `aspen`, `maison`

***

### Method C: GitHub Clone

For developers who want git history:

```bash theme={null}
git clone https://github.com/Weaverse/pilot.git my-store
cd my-store && rm -rf .github   # remove Pilot's internal workflows
npm install
cp .env.example .env
# Edit .env with your configuration
npm run dev
```

> [!WARNING]
>
> Remove the `.github` folder after cloning. Its workflows (Pilot's own Oxygen deployment, CI, and code review) need Weaverse's secrets and fail on your first push. When you [deploy to Oxygen](https://weaverse.io/docs/guides/deployment/oxygen.md), Shopify adds a fresh `oxygen-deployment-*.yml` workflow for your storefront. Methods A and B remove the folder for you.

## Configuration

### Required Environment Variables

```bash theme={null}
# Your Shopify store domain (without https://)
PUBLIC_STORE_DOMAIN=your-store.myshopify.com

# Storefront API token
PUBLIC_STOREFRONT_API_TOKEN=your_storefront_api_token

# Weaverse project ID
WEAVERSE_PROJECT_ID=your-weaverse-project-id

# Session secret
SESSION_SECRET=<generated-random-secret>
```

### Getting API Tokens

**For stores on a Shopify plan**: Install the Hydrogen sales channel ([https://apps.shopify.com/hydrogen](https://apps.shopify.com/hydrogen)), create one Hydrogen storefront project, then run `npx shopify hydrogen env pull`. If the CLI cannot pull yet, copy values from **Hydrogen sales channel → Storefront Settings → Environments and variables**.

**For development stores or stores without a Shopify plan**: Install the Headless sales channel ([https://apps.shopify.com/headless](https://apps.shopify.com/headless)), copy the Storefront API values, and add them to `.env` manually or give them to your AI agent to handle.

**Session Secret**: Generate with `node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"`

## Verification

After installation:

1. **Start server**: `npm run dev`
2. **Check storefront**: Visit `http://localhost:3456`
3. **Access Studio**: Go to `https://studio.weaverse.io/projects/your-project-id`
4. **Test editing**: Make changes in Studio and verify they appear

## Common Issues

### CLI Command Fails

* Ensure Node.js 22.18+ or 24.11+ installed: `node --version`
* Clear npm cache: `npm cache clean --force`

### Studio Preview Not Loading

* Verify dev server runs on port 3456
* Check browser console for errors
* Ensure no firewall blocks the port

### Environment Variables Not Working

* Ensure `.env` file is in project root
* Restart dev server after changes
* Check variable names are exact (case-sensitive)

## Component Development Basics

After installation, you can start building custom sections. Here's a simple example:

```tsx theme={null}
// app/sections/hero/index.tsx
import { createSchema } from '@weaverse/hydrogen/react-router';
import type { WeaverseComponentProps } from '@weaverse/hydrogen/react-router';

interface HeroProps extends WeaverseComponentProps {
  heading: string;
  description: string;
}

function Hero(props: HeroProps) {
  const { heading, description, className, ...rest } = props;

  return (
    <section {...rest} className={`py-12 px-4 max-w-7xl mx-auto ${className || ''}`}>
      <div className="text-center">
        <h1 className="text-4xl font-bold">{heading}</h1>
        <p className="mt-6 text-lg text-gray-600">{description}</p>
      </div>
    </section>
  );
}

export default Hero;

export const schema = createSchema({
  type: 'hero',
  title: 'Hero Section',
  settings: [
    {
      group: 'Content',
      inputs: [
        { type: 'text', name: 'heading', label: 'Heading', defaultValue: 'Welcome' },
        { type: 'textarea', name: 'description', label: 'Description' },
      ],
    },
  ],
});
```

## Development Workflow

1. **Create component** in `app/sections/` or `app/components/`
2. **Define schema** with `createSchema()` and configurable properties
3. **Register it** in `app/weaverse/components.ts` by adding the module to the `components` array:

   ```ts theme={null}
   // app/weaverse/components.ts
   import type { WeaverseComponent } from '@weaverse/hydrogen/react-router';
   import * as Hero from '~/sections/hero';

   export const components: WeaverseComponent[] = [Hero];
   ```
4. **Test in Studio** at `https://studio.weaverse.io/projects/your-project-id`

## Next Steps

1. **[Core Concepts](https://weaverse.io/docs/core-concepts)** - Understand how Weaverse works
2. **[Development Guide](https://weaverse.io/docs/development-guide/index)** - Build custom sections
3. **[API Reference](https://weaverse.io/docs/api-reference/introduction.md)** - Complete API documentation

Need help? Check our [FAQ](https://weaverse.io/docs/resources/faq.md) or [Community](https://weaverse.io/docs/community/community.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.