> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mobster.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# mobster expo

> Open your Expo app on a simulator or your iPhone, and build it.

Open your Expo app on a simulator or your iPhone from the JavaScript Metro serves, in your dev client or Expo Go, and check a screen. Build it for checks and CI: Release for the simulator, with the JavaScript inside, or your dev client on your iPhone.

## Usage

```text theme={"theme":"css-variables"}
mobster expo <command>
```

```text theme={"theme":"css-variables"}
examples:
  mobster expo preview --device "Test iPhone" --expect "Welcome back"
  mobster expo reload
  mobster expo build
  mobster expo build --device "Test iPhone"
```

## Commands

| Command | What it does |
| - | - |
| [`mobster expo doctor`](#mobster-expo-doctor) | say what Mobster found in this Expo or React Native project |
| [`mobster expo preview`](#mobster-expo-preview) | open the app on a simulator or your iPhone from Metro, and check a screen |
| [`mobster expo dev`](#mobster-expo-dev) | run the dev loop: Metro, the dev client, the app open, a reload on every save |
| [`mobster expo reload`](#mobster-expo-reload) | reload the JavaScript in every app connected to Metro |
| [`mobster expo build`](#mobster-expo-build) | build the app for a simulator or your iPhone |
| [`mobster expo stop`](#mobster-expo-stop) | stop the Metro that `mobster expo preview` started |

## `mobster expo doctor`

Read package.json and the Expo config, and say what Mobster found: the app's name, bundle ID and schemes, whether it opens in your dev client or Expo Go, whether the ios folder exists, and whether Metro is running. Reads only.

### Options

| Name | Default | Description |
| - | - | - |
| `--port N` | 8081 | Metro's port |
| `--json` | off | print it as JSON |

## `mobster expo preview`

Open your app on a simulator or your iPhone from the JavaScript Metro serves from your working tree: in your dev client when the app has expo-dev-client, else in Expo Go. Starts Metro in the background when nothing answers on the port. With `--expect`, waits for the text and says whether it's on screen, with a screenshot.

### Options

| Name | Default | Description |
| - | - | - |
| `--device NAME` | your iPhone, else the only device | a device from `mobster devices` |
| `--port N` | 8081 | Metro's port |
| `--path PATH` | none | then open this screen by the app's own deep link, such as settings/profile |
| `--expect TEXT` | none | text that must be on screen once the app loads; repeatable |
| `--wait S` | 45 | how long `--expect` waits for the bundle to load |
| `--no-start` | off | don't start Metro; fail when it isn't running |
| `--screenshot FILE` | with `--expect`: .mobster/expo/preview\.png | save the screen here |
| `--json` | off | print the result as JSON |

```text theme={"theme":"css-variables"}
exit codes: 0 opened (and every expectation held), 1 an expectation didn't hold, 3 couldn't

examples:
  mobster expo preview
  mobster expo preview --device "Test iPhone" --expect "Welcome back"
  mobster expo preview --path settings/profile --expect Profile
```

## `mobster expo dev`

Start this project's Metro (or reuse it), install your dev client on the device when it isn't there, open the app, and reload it each time you save a source file. When Metro can't bundle the app, it says so with Metro's error and keeps watching: the next save tries again. ctrl+c stops the Metro this command started. `--check` runs saved checks on the device once the app is up.

### Options

| Name | Default | Description |
| - | - | - |
| `--device NAME` | your iPhone, else the only device | a device from `mobster devices` |
| `--port N` | 8081, else the next free one | Metro's port |
| `--check PATH` | none | a check file or folder to run on the device once the app is up; repeatable |
| `--no-install` | off | don't build and install the dev client when it is missing |
| `--once` | off | open the app, run the checks, and stop; no watching |
| `--json` | off | print one JSON line per event |

```text theme={"theme":"css-variables"}
exit codes: 0 stopped with ctrl+c (or --once: opened and every check held), 1 Metro can't bundle the app or a check didn't hold, 3 couldn't

examples:
  mobster expo dev --device "Test iPhone"
  mobster expo dev --once --check .mobster/checks/home.yaml
```

## `mobster expo reload`

Send Metro's reload to every app connected to it, as pressing r in `npx expo start` does.

### Options

| Name | Default | Description |
| - | - | - |
| `--port N` | 8081 | Metro's port |

## `mobster expo build`

Build the app. For a simulator: a Release build into .mobster/build with the JavaScript inside, so it runs with no Metro (what checks and CI use), after `npx expo prebuild` when there's no ios folder. For an iPhone: your dev client, signed with your team and installed by `npx expo run:ios --device`. `--eas` builds an EAS profile on this Mac with `eas build --local`.

### Options

| Name | Default | Description |
| - | - | - |
| `--device NAME` | none | build for this device: an iPhone (installs your dev client) or a Mobster simulator |
| `--install` | off | install the build on `--device` |
| `--debug` | off | a Debug build that loads its JavaScript from Metro (the dev client), not Release |
| `--eas PROFILE` | none | build this EAS profile on this Mac (eas build `--local`) |
| `--json` | off | print the build as JSON |

```text theme={"theme":"css-variables"}
examples:
  mobster expo build
  mobster expo build --device "iPhone 17 Pro" --install
  mobster expo build --device "Test iPhone"
  mobster expo build --eas development --device "Test iPhone" --install
```

## `mobster expo stop`

Stop the Metro server `mobster expo preview` started in the background for this project.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.