Skip to main content

Prerequisites

  • Revyl CLI installed and authenticated (revyl auth login)
  • An Expo or React Native project with a dev client build

Step 1: Configure hot reload

Hot reload is configured automatically during init. If detection picks the wrong provider (common in monorepos), use revyl init --provider expo — that updates .revyl/config.yaml with the right settings. For the provider config schema (expo, react-native, app_scheme, platform_keys, etc.), see Dev Loop Overview. For per-framework setup nuances (monorepos, KMP, Flutter), see Dev Loop Framework Guides.

Step 2: Upload a dev build

Upload a development client build for the branch you’re working on:
For Expo, this is a dev client build. For bare React Native, it’s your debug build. revyl dev automatically picks the build that matches your current git branch. If no match is found, it falls back to the latest available build.

Step 3: Start the dev loop

This:
  1. Starts your local dev server (Expo via npx expo start --dev-client, or Metro via npx react-native start)
  2. Creates a Revyl relay to expose it to cloud devices
  3. Installs the dev client build on a cloud device
  4. Opens the device session in your browser
Normal runs keep advisory HMR diagnostics quiet so they do not look like startup failures. If you are troubleshooting relay or HMR internals, run with revyl dev --debug to print the diagnostic probes. Now edit code locally and see changes reflected on the device instantly.

Platform and build overrides

If Revyl starts Expo and verifies relay transport but times out proving the first Expo manifest, retry with --force-hot-reload first. This launches after the relay and dev server start, skipping only the manifest and bundle proof. If the app loads, keep working; if the dev client shows a project load error, restart Expo/Metro or capture revyl device report --session-id <id> --json. If you already run Expo with its own tunnel, you can collapse the manual device start + deep-link step into one command:
--tunnel accepts either the full Expo dev-client link or the raw https://... tunnel URL. Passing the full dev-client link works even when the local Revyl config does not have an Expo app_scheme. Prefer the Revyl relay first in cloud-agent environments; use Expo tunnel fallback only after device screenshots or revyl device report --session-id <id> --json show force mode still did not load through the relay.

Step 4: Interact with the device

Use revyl device commands to observe, act, and verify in a tight loop.
Always follow the observe-act-verify pattern: screenshot before an action, take the action, then screenshot again to confirm the result. Scroll through content with swipe:

Step 5: Run tests in dev mode

While the dev loop is active, run existing tests against your local code:
To reuse a running dev loop’s relay from another terminal:

Step 6: Create tests from the dev loop

After verifying a flow manually, convert it to a regression test:

Step 7: Promote to regression

Once the test is stable, push and run it outside dev mode:

New branch workflow

When you create a new branch and want revyl dev to use that branch’s build:
If you already have a local artifact and want to skip the build step:

Device-first flow

Start a plain device session first, then attach and run the dev loop on it:
When the dev loop exits, the attached session stays running. Run revyl dev --context checkout again to resume, or revyl dev stop to detach.

Context management

Team sharing

All developers push builds to a shared app container (the app_id in config). Each developer gets their own cloud device session, relay URL, and local server. For JS projects, multiple developers can share the same dev build and still see their own code changes.