Github|...

Installation

Getting started with Spooky involves setting up the CLI tool and configuring your project.

Prerequisites

  • Node.js (v18 or higher)
  • SurrealDB (v2.0 or higher)
  • Rust (for compiling modules)

Step 1: Install the CLI

The Spooky CLI is your primary tool for generating code and managing schemas.

Bash
pnpm add -D @spooky-sync/cli

Step 2: Install Client SDKs

Install the core client and the bindings for your framework.

Bash
pnpm add @spooky-sync/core @spooky-sync/client-solid

Step 3: Run Infrastructure

The easiest way to start the Sidecar and SurrealDB is via Docker Compose.

yaml
version: '3.8'
services:
surrealdb:
  image: surrealdb/surrealdb:latest
  command: start --user root --pass root file://data.db
  ports:
    - "8000:8000"
  volumes:
    - ./data:/data

spooky-sidecar:
  image: ghcr.io/spooky-org/sidecar:latest
  environment:
    - SURREAL_URL=ws://surrealdb:8000
    - SURREAL_USER=root
    - SURREAL_PASS=root
  depends_on:
    - surrealdb

Run it with:

Bash
docker compose up -d