Develop

After waid login, run your app with live Vite updates:

bash
waid dev --in .

waid dev starts Vite and launches the Detir desktop runtime by default. Vite owns source watching, React Refresh, CSS updates, and HMR; it does not rebuild dist for each edit. Native configuration changes may require a rebuild or reinstall.

FlagWhat it does
--in <dir>App source root. Defaults to the current project.
--target desktop|ios|androidPreview target. Defaults to desktop.
--port <port>Vite server port. Otherwise derived from the project.
--mode <name>Vite environment mode. Defaults to development.
--dev-host <lan-ip>Required for iOS; an optional Android LAN fallback.
--runtime-dir <dir>Override the native runtime.
--no-launchStart only the managed Vite server.
bash
waid dev --in ./my-app --port 5173
waid dev --in ./my-app --no-launch
waid dev --in ./my-app --target ios --dev-host <your-lan-ip>

Desktop menus (optional)#

Packaged desktop apps get the standard menu bar automatically (App, Edit with working Cut/Copy/Paste, Window). You can add your own menus at runtime from JavaScript. It's a no-op on non-desktop platforms, so the same code is safe everywhere:

ts
if (waid.menus.supported) {
waid.menus.set([
{ label: "Project", submenu: [
{ label: "New Run", accelerator: "CmdOrCtrl+N", onSelect: startRun },
{ type: "separator" },
{ label: "Export", submenu: [{ label: "JSON", onSelect: exportJson }] },
]},
])
}
waid.menus.clear() // back to just the standard menus

Re-call set() when your app state changes; it replaces your menu section.