[ Documentation ]
rnx open

rnx open

rnx open

Resolve a port, dev-server URL, bundle URL, full shell URL, or app deep link. The first browser sim uses an isolated Playwright Chrome for Testing profile. Later opens reuse the saved sim and navigate it in place. Custom-scheme URLs and leading-slash routes dispatch through the current app’s React Native Linking pipeline. Named profiles force a fresh Electron or Playwright sim because storage isolation is fixed at window/context construction time. A rnx preview/build link (e.g. https://rnxsim.com/preview/<id>) is a full player page, not a driveable sim; open recognizes it and launches it in your browser for viewing instead of mis-loading the HTML as a bundle.

terminal
rnx open <port|target|bundle-url|rnx-url|deeplink> [--new]

Options

flagdescription
--newopen a genuinely concurrent sim instead of reusing the current one. each new sim creates another isolated browser tree
--profile <id>open with an isolated persistent storage profile
--ephemeralopen with a temporary isolated storage profile. combined with --new --driver playwright this is the guaranteed-clean boot: a throwaway browser profile with no service worker registration and no preview-share IndexedDB, so nothing a previous sim left behind can steer this one
--driver <id>launch a fresh sim through playwright (default browser surface) or electron (native desktop surface)
--headlesspass headless=true to the launch driver (useful with --driver playwright for CI runs)
--cdp-port <number>expose Chrome remote debugging on this port so the sim can be cpu-profiled while still driveable over the bridge (playwright driver only)
--device <model>device profile for the opened sim (e.g. iphone-16, iphone-16-pro-max, pixel-8). stamped on the engine URL so every open path honors it; playwright sims also size their viewport to the device instead of a desktop-shaped default
--viewport <WxH>explicit page size for a driver-launched sim (e.g. 1920x1080 to frame the 3d stage in landscape for film capture). takes precedence over the device-derived window size (playwright driver only)
--base-url <url>base shell URL to wrap around bundle targets
--replace <module>=<file>replace a Metro module with a local file for this run; useful for swapping in a deterministic fixture component during demos. repeatable
--remap <host:port>=<host:port>rewrite guest-app fetch/websocket traffic from one host:port to another for this run (e.g. a third-party e2e suite that hardcodes a port already taken on the host). repeatable
--no-describeskip the automatic describe snapshot that prints right after open finishes (useful when scripting and you only want open’s own output)
--hotforce metro HMR on (sets hot=true on the bundle URL). default for interactive opens; edits hot-apply through rnx’s HmrClient
--no-hmrforce metro HMR off (sets hot=false on the bundle URL). default under --driver playwright so agent/CI runs stay deterministic with no in-bundle refresh wiring
--port <number>bridge port (defaults to 7668)

Examples

terminal
rnx open 8081
rnx open --new 8085
rnx open 8081 --profile qa
rnx open 8081 --profile qa --driver playwright
rnx open http://localhost:8082
rnx open /settings
rnx open myapp://settings/profile
rnx open 8081 --driver playwright --headless
rnx open 8081 --new --driver playwright --device iphone-16
rnx open 8089 --new --driver playwright --cdp-port 9222
rnx open 8081 --new --ephemeral --driver playwright
rnx open 8081 --no-describe
rnx open 8081 --no-hmr
rnx open 8081 --driver playwright --hot
rnx open https://rnxsim.com/preview/<id>

Run It From The App Root

Start Metro, Expo, React Native, or One with the app’s normal development command. rnx does not own that process. Then run rnx open from the app project root, where its Metro or Expo configuration lives. The command can run elsewhere, but this directory is the fallback for discovering custom native-linked fonts, the configured splash screen, and other file-based app configuration when the development server does not report its project root.

Resolution Rules

open accepts four inputs:

  • +
    a raw dev-server port like 8081
  • +
    a dev-server base URL like http://localhost:8081
  • +
    a full bundle URL
  • +
    a full rnx shell URL

For raw targets, open now hands the input to the shell instead of guessing a fallback bundle URL. Numeric targets open as /rn/<port>, while non-port inputs fall back to /rn?open=... so ConnectRN can resolve them inside the shell.

Managed Surfaces

open uses an isolated Playwright browser by default. Pass --driver electron for the native desktop surface. Both register with the same bridge and reuse the current managed sim unless you explicitly request a new profile or sim.

Sim pages never fall through to the operating-system browser handler. Preview pages and external links still open in the user’s browser because they are viewing pages, not driveable sims.