Github|...

Installation

Install the CLI and client SDKs, then bring up the stack. For a new project, spky init does all of this for you.

Note

Starting fresh? spky init scaffolds the project, installs everything and generates types in one go. This page is for adding Sp00ky to an existing codebase.

Requirements: Node.js 22.12 or newer (the workspace pins >=22.21.1), and Docker for the local stack. Rust only if you intend to build the SSP or scheduler from source, prebuilt images are the default.

  1. Install the CLI
    pnpm add -D @spooky-sync/cli

    spky is how you generate types, run migrations, start the local stack and deploy.

  2. Install the client SDKs

    The core client plus the bindings for your framework.

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

    Flutter projects depend on spooky_core from pub instead. See the Flutter guide.

  3. Start the stack
    spky dev

    This brings up SurrealDB and the SSP sidecar, applies migrations, and starts any app with a dev block in sp00ky.yml. See spky dev.

    If you’d rather wire the infrastructure yourself:

    docker-compose.yml
    services:
      surrealdb:
        image: surrealdb/surrealdb:v3.1.0-beta.3
        command: start --user root --pass root rocksdb:/data/db
        ports:
          - "8666:8000"
        volumes:
          - ./data:/data
    
      ssp:
        image: ghcr.io/sp00ky-org/ssp-server:canary
        environment:
          - SPKY_DB_URL=http://surrealdb:8000
          - SPKY_DB_USER=root
          - SPKY_DB_PASS=root
          - SPKY_SSP_LISTEN_ADDR=0.0.0.0:8667
          - SPKY_SSP_REF_MODE=dedicated
        depends_on:
          - surrealdb
    docker compose up -d
  4. Verify
    spky doctor

    spky doctor checks that sp00ky.yml parses, the schema source exists, generated types are current, and the migrations directory is in place. Each failed check prints the command that fixes it. Re-run it after every schema edit. It’s the fastest feedback loop there is.

Next