sneferu dev
Start a local preview server that rebuilds when files change. Usage, options, output, exit codes and errors.
On this page
Start a local preview server that rebuilds when files change.
Serves the theme with the real renderer and sample data on localhost, recompiles on every save and shows compile errors in the page. It runs until you stop it with Ctrl+C. It needs no login and no network.
Requirements: Runs locally; no login and no network.
Usage
sneferu dev [options] [dir]Arguments
| Argument | Required | Default | Description |
|---|---|---|---|
dir | no | . | Theme folder. |
Options
| Option | Default | Description |
|---|---|---|
--port <n> | 4100 | Port to listen on. |
--data <file> | off | Sample data JSON. Default: .sneferu-dev/data.json when it exists, else the built-in sample store. |
Examples
sneferu devPreview on http://127.0.0.1:4100.
sneferu dev --port 4200 --data my-data.jsonAnother port and your own sample data.
Output
sneferu dev my-theme --port 4177: Prints one line and keeps running (here stopped with Ctrl+C).
Sneferu dev → http://127.0.0.1:4177Exit codes
| Code | Meaning |
|---|---|
0 | Stopped with Ctrl+C. The command is long-running, so it normally has no exit code until you stop it. |
Common errors
✖ options.port should be >= 0 and < 65536. ...
--port is not a number in range. In the tested SDK version the process printed this and kept running instead of exiting, so stop it with Ctrl+C. Pass a port between 0 and 65535.
