Github|...

spky dev

One command brings up SurrealDB, the SSP, the scheduler and your own apps, with migrations already applied.

spky dev

Thatโ€™s your whole local stack. It reads sp00ky.yml, starts everything in dependency order, applies pending migrations, and streams the logs of every service into one terminal. Ctrl+C tears it all down.

๐Ÿ‘ป sp00ky dev  ยท  singlenode  ยท  v0.0.1

  โœ“ Ports free            8666 8667
  โœ“ Schema drift          in sync
  โœ“ Docker network
  โœ“ SurrealDB             ready ยท 2.1s
  โœ“ Namespace / database  main/main
  โœ“ Migrations            up to date
  โ†ท Internal schema       unchanged
  โœ“ Remote functions      โ†’ http://ssp:8667
  โœ“ SSP                   started
  โœ“ Apps                  web, api

  โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
  โ”‚  Development environment ready               โ”‚
  โ”‚                                              โ”‚
  โ”‚  web         http://localhost:5173/          โ”‚
  โ”‚                                              โ”‚
  โ”‚  SurrealDB   http://localhost:8666           โ”‚
  โ”‚  SSP         http://localhost:8667           โ”‚
  โ”‚                                              โ”‚
  โ”‚  api         http://localhost:3001           โ”‚
  โ”‚                                              โ”‚
  โ”‚  Ctrl+C to stop  ยท  errors only, --verbose for all logs โ”‚
  โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
ServiceLocal URLRole
SurrealDBhttp://localhost:8666The database. Your client connects here.
SSPhttp://localhost:8667Incremental view maintenance and the job runner.
Schedulerhttp://localhost:9667Cluster coordinator. Only in mode: cluster.

Any app in sp00ky.yml with a dev block starts too. See Dev servers & sidecars.

What it does on startup

  1. Checks your schema against the database and warns about drift.
  2. Creates the Docker network and starts SurrealDB, waiting for it to report healthy.
  3. Ensures the namespace and database exist.
  4. Applies pending migrations, then the internal Sp00ky schema and remote functions.
  5. Starts the scheduler (cluster mode) and the SSP.
  6. Starts your apps.

Flags

FlagEffect
--apply-migrationsApply pending migrations without prompting. What you want in a script.
--skip-migrationsSkip the migration check entirely.
--fix-checksumsUpdate stored checksums for migration files that were edited after being applied.
--cleanWipe SSP and scheduler state so they re-bootstrap from SurrealDB. Your data is preserved.
--clean-dbAlso wipe the SurrealDB volume. Implies --clean.
--verbose, -vShow every log line after startup: SurrealDB / SSP / scheduler (compact-formatted) and your appsโ€™ dev servers. Also SPKY_VERBOSE=1.

By default, once the stack is ready, only errors and crash traces are shown, from the infrastructure services and from your own apps alike (stack frames stay attached to their error). The ready box leads with your frontendโ€™s URL. Declare port: on its dev: block to have it there immediately; otherwise spky dev starts the app dev servers first and reads the URL the frontend announces (viteโ€™s Local: http://โ€ฆ), waiting up to 20 s for it. Backends are listed below the infrastructure rows, from their deploy.port or docker port mapping. Warnings and everything else need --verbose. Startup itself is a checklist: each step is one line that updates in place (a spinner while it runs, then โœ“, โ†ท for โ€œnothing to doโ€, ! for โ€œneeds your attentionโ€, โœ— for a failure with the relevant container logs underneath). When output is piped (CI, | cat) the same steps print as plain one-line entries.

--clean-db deletes your local data

--clean is the recovery tool: it clears derived state (views, snapshots) and rebuilds it from the database. --clean-db throws away the database too. Reach for --clean first. It fixes most โ€œmy query returns nothingโ€ situations without costing you your seed data.

The edit loop

With spky dev running:

  • Edit .surql โ†’ the schema is regenerated, so your types update. Create a migration with spky migrate create when youโ€™re ready to make the change durable.
  • Edit app code โ†’ your own dev server handles it (Vite, next dev, whatever you configured).
  • Something looks wrong โ†’ spky doctor in a second terminal, then spky jobs or spky logs depending on whatโ€™s stuck.
Note

Ports 8666, 8667 and 9667 must be free. spky dev checks them up front and tells you which process is holding one.

Next