Reference: CLI

Reference

CLI

Seven commands. sigil dev is the one you will use most; the rest are scaffolding and production.

sigil --help
sigil --version

create

Scaffolds a new project:

sigil create my-app

dev

Development server — compiles on demand, watches files, hot-reloads:

sigil dev

Reads sigil.config.ts and expects dev to be on. This is the command to use while writing an app.

start

Production server behind the loom coordinator:

sigil start
sigil start --scale api=2,frontend=1
sigil start --no-build
  • --scale <spec> — worker counts per group, e.g. api=2,frontend=1. Without it, the config decides.
  • --no-build — skip the build step and serve the existing output. Use it when the build already ran in CI, or you will compile twice on every deploy.

This is the command that runs in production. The coordinator supervises the workers and restarts them if one dies.

build

Compiles a production bundle without serving anything:

sigil build

What sigil start does first unless you pass --no-build. Run it alone in CI so a compile failure fails the pipeline instead of a deploy.

preview

Serves a production build locally, without the coordinator's supervision or restart behaviour:

sigil preview

Useful for checking a production build on your own machine before shipping it. For anything you intend to deploy, test with sigil start — preview does not exercise the same process model.

routes

Prints the route table the scanner found:

sigil routes

The fastest way to answer "why is this URL 404ing". It prints the methods, the resolved path, and the file each came from — including WS for WebSocket routes. If a route is missing here, it is missing from the build — the most common cause is a directory with only a +page.server.ts and no +page.tsx or +server.ts, which the scanner drops silently.

generate

Scaffolds a file. Aliased to g:

sigil g page books/[id]
sigil g layout admin
sigil g api search
sigil g component Button
sigil g error
sigil g ws
sigil g hooks
sigil g middleware
sigil g auth
TypeCreates
pageA route: +page.tsx and +page.server.ts
layoutA +layout.tsx wrapping a directory
apiA +server.ts handler
componentA component in src/components
errorA +error.tsx boundary
wsA WebSocket route
hookshooks.server.ts
middlewareA middleware file
authAn auth scaffold

One caveat: auth is implemented but missing from the --help text, so sigil g --help lists eight types and not nine. It works; the help is wrong.

info

Prints project information — versions, detected config, route count:

sigil info

The first thing to run when a build behaves differently on your machine than in CI.

Next

Edit this page