spky dev
One command brings up SurrealDB, the SSP, the scheduler and your own apps, with migrations already applied.
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.
| Service | Local URL | Role |
|---|---|---|
| SurrealDB | http://localhost:8666 | The database. Your client connects here. |
| SSP | http://localhost:8667 | Incremental view maintenance and the job runner. |
| Scheduler | http://localhost:9667 | Cluster 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
- Checks your schema against the database and warns about drift.
- Creates the Docker network and starts SurrealDB, waiting for it to report healthy.
- Ensures the namespace and database exist.
- Applies pending migrations, then the internal Sp00ky schema and remote functions.
- Starts the scheduler (cluster mode) and the SSP.
- Starts your apps.
Flags
| Flag | Effect |
|---|---|
--apply-migrations | Apply pending migrations without prompting. What you want in a script. |
--skip-migrations | Skip the migration check entirely. |
--fix-checksums | Update stored checksums for migration files that were edited after being applied. |
--clean | Wipe SSP and scheduler state so they re-bootstrap from SurrealDB. Your data is preserved. |
--clean-db | Also wipe the SurrealDB volume. Implies --clean. |
--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 withspky migrate createwhen 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 doctorin a second terminal, thenspky jobsorspky logsdepending on whatβs stuck.
Ports 8666, 8667 and 9667 must be free. spky dev checks them up front and tells you which
process is holding one.