# Developing locally

Most of the time you build your app by chatting with your AI and letting onvibe
deploy it. But sometimes you want to iterate on your own machine — fast, offline,
poking at the code directly — before you ship. `onvibe-dev` gives you exactly that,
without the usual "works on my machine, breaks in production" tax.

## Nothing to install

There's no package to add and no account to wire up. From a folder with your app's
code, run:

```
npx https://onvibe.run/onvibe-dev.tgz ./app
```

That's it — your app starts on `localhost`. (You'll need [Deno](https://deno.com)
installed; the tool checks and tells you if it's missing.)

## A runtime that matches production

`onvibe-dev` isn't a rough approximation — it's a **high-fidelity** runtime. It runs
your app with the **same platform helpers** and the **same services** you get live:

- File uploads and signed download URLs (backed by local disk while you develop).
- Public assets.
- Email sending (logged to your console instead of actually sent).
- A simulated auth edge that signs the current user's identity exactly like production
  does — so `currentUser()` behaves the same locally as it does when deployed.

Your app code and the helpers are **byte-identical to what runs live**, so the
behaviour you see on `localhost` is the behaviour you'll get after you deploy.

## Developing against real data

Need a real database while you work? Ask `onvibe-dev` for an **ephemeral development
database** — a temporary Postgres, created on demand and reached over a **secure tunnel
through onvibe**. Your database is never exposed to the public internet; the tunnel
bridges your local process to it and tears everything down when you're finished. There
are per-account limits so things stay tidy.

## The workflow

1. Run `npx https://onvibe.run/onvibe-dev.tgz ./app` to start locally.
2. Edit your code and refresh — iterate as fast as you like, offline.
3. When it looks right, deploy through your AI and ship with confidence that local
   behaviour carries over.

Local development is optional — you never *need* it — but when you want tight,
hands-on iteration, it's there.
