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>"

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.