Github|...

Installation

Getting started with Sp00ky 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 Sp00ky 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 everything is with the Sp00ky CLI:

Bash
spooky dev

This starts SurrealDB, the SSP sidecar, applies migrations, and runs your app dev server — all in one command. If your backends have a dev field configured in sp00ky.yml, those are started too. See Backend Functions for details.

Alternatively, you can set up infrastructure manually with 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

sp00ky-sidecar:
  image: ghcr.io/sp00ky-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