# snizu theme dev

Source: https://snizu.dev/docs/cli/theme/dev

## Usage [#usage]

```sh title="Usage"
snizu theme dev [dir] --store <address> [--port 9292]
```

## Flags [#flags]

<Fields>
<Field name="--store" type="<address>" required>
A development store of your organization, by its address (`siwa-grove-test`), name or ID. Merchants' stores refuse previews.
</Field>

<Field name="--port" type="number">
The local server's port on 127.0.0.1. 9292 by default.
</Field>
</Fields>

The folder needs its `theme.json`, and to be linked to one of your themes: run [`snizu theme push`](/docs/cli/theme/push) once and it is.

## What happens on save [#what-happens-on-save]

<Steps steps={[{"title":"Settle","text":"300 ms after the last change, the folder is packed and sent."},{"title":"Check","text":"Our servers scan it and run the same checks as a theme push, before the draft changes."},{"title":"Reload","text":"CSS swaps in place; anything else reloads the page."}]} />

The draft keeps the version in `theme.json` and replaces itself each time, so iterating needs no new number. When that number already went to review, raise it.

A problem never leaves the store on nothing: the check runs before the draft is replaced, and what it found shows in the terminal and over the page, each with its file.

## Examples [#examples]

```shellsession title="Terminal"
$ snizu theme dev ./nakhla --store siwa-grove-test
Sending the theme to the store…
✓ Previewing on Siwa Grove test at http://127.0.0.1:9292
Only you can see this, for as long as this runs. Ctrl+C to stop.
✓ Sent assets/theme.css
✓ Sent 3 files
```

When a save is refused, each problem prints after a `!` and shows over the page until the next save that works.

The local address is in front of the store and answers only on 127.0.0.1. Links, forms and the cart work through it, and the store's password page is passed for you.

<Callout title="Stopping leaves the draft">
Press Ctrl C to stop. The draft stays on your theme, so the next run picks up where you left off.
</Callout>