# voxal dev

> Run your app locally in your terminal with reload on save

`voxal dev` runs your app against your own terminal and reloads it on every save. No server,
no deploy, and no login required. It is the fastest way to iterate.

```bash
voxal dev [dir]
```

`dir` defaults to the current directory. The entry file comes from `voxal.json` (the `main`
field, default `app.js`).

## What it does

1. Reads `voxal.json` for the entry file.
2. Requires an interactive terminal (a TTY) on both stdin and stdout. It errors if either is
   piped.
3. Builds the bundle once, then renders the app in your terminal: your keystrokes become
   `onKey` events, resizing the window fires `onResize`, and `conn.write` paints the screen.
4. Watches the entry's directory. Saving a file that matches `/\.(jsx?|tsx?|json)$/` triggers
   a debounced rebuild and reloads the app.

If a rebuild fails, the last good app stays on screen and the error is printed below it. Fix
the code and save again.

## Controls

- `Ctrl-C` is forwarded to the app, so your app can handle it.
- Press `Ctrl-C` twice in a row to force-quit dev.

<Callout type="warn" title="dev is not the production sandbox">
`voxal dev` runs your app locally with Node, as a convenience for previewing. Its network is
your machine's network, with none of the production restrictions. Production runs your app in
a hardened sandbox with strict outbound rules, so do not rely on dev behavior for security
testing. See [Security](/platform/security).
</Callout>

The production [`fetch`](/sdk/fetch) is host-bridged and guarded, so an endpoint that works in
dev may be blocked in production if it resolves to a private or internal address.

---

Source: https://docs.voxal.sh/cli/dev
