Dev loop
Agent loop (recommended)
npx lakebed-native new my-app --template todo
cd my-app && bun install
npx lakebed-native doctor
npx lakebed-native shell fetch --platform ios
npx lakebed-native dev
# new terminal:
npx lakebed-native open --url "<deep link printed by dev>"
- Dev serves the capsule server on
--port(default 3000) and the RN bundle on--native-port(default 3100) via esbuild — no Expo install in the capsule. - Deep links use device-reachable hosts (
localhostfor iOS sim,10.0.2.2for Android emu). LAN IP is printed for physical devices. useQuerysubscribes over WebSocket for live updates (like web Lakebed).
Pack loop (standalone app)
npx lakebed-native hosted start --port 4000 # optional but keeps deploy data alive
npx lakebed-native build --target native-preview
npx lakebed-native pack . --platform ios --api https://api.lakebed.dev
xcrun simctl install booted .lakebed-native/artifacts/*.app
Packed apps embed the JS bundle — do not use the dev deep link. Launch the installed app icon.
Local hosted runner
deploy and pack --deploy auto-start http://localhost:4000, but that process is in-memory unless you keep it alive:
npx lakebed-native hosted start --port 4000
Troubleshooting
npx lakebed-native doctor
npx lakebed-native devices --json
See differences-from-web.md when porting web capsule code.