Skip to content
Hekana Spray
Documentation
Getting started
Theme development
Components and tags

Localization

Apps and custom code

Examples and recipes
API reference
Publishing
Build apps
AI development

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

bash
sneferu dev [options] [dir]

Arguments

ArgumentRequiredDefaultDescription
dirno.Theme folder.

Options

OptionDefaultDescription
--port <n>4100Port to listen on.
--data <file>offSample data JSON. Default: .sneferu-dev/data.json when it exists, else the built-in sample store.

Examples

bash
sneferu dev

Preview on http://127.0.0.1:4100.

bash
sneferu dev --port 4200 --data my-data.json

Another port and your own sample data.

Output

sneferu dev my-theme --port 4177: Prints one line and keeps running (here stopped with Ctrl+C).

text
Sneferu dev → http://127.0.0.1:4177

Exit codes

CodeMeaning
0Stopped 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.

Next steps