cli

Your phones, from the terminal.

One npm install gives you the MobAI device host and a command for every action: tap, type, read the screen, run tests. It works on iPhones, Android phones, simulators and emulators. No desktop app needed, on macOS, Linux and Windows.

$ npm i -g @mobai-app/cli
added 2 packages in 4s

$ mobai devices list
No MobAI app running; starting a local host at 127.0.0.1:8686...
ID              PLATFORM  NAME           OS    BRIDGE
00008101-000D…  ios       iPhone 13      26.1  stopped
00008130-0011…  ios       iPad Air       26.0  stopped
39021FDH200…    android   Pixel 8        16    stopped
install

One install, every platform

npm picks the build for your machine: macOS (Apple Silicon and Intel), Linux (x64 and arm64) and Windows. Install it globally, run it once with npx, or add it to a test project.

bash
npm install -g @mobai-app/cli
bash
npx @mobai-app/cli devices list
no app needed

The device host comes with it

The CLI carries the same device host as the desktop app. When nothing is running, the first command starts one in the background, and it stops after 30 minutes without requests.

With the MobAI app open, the CLI uses the app instead. Run mobai serve yourself to keep a host up on a CI machine or a box in the corner.

bash
mobai serve --background
mobai serve status
mobai serve stop
where it runs

Runs where you work

  • iPhones and iOS simulators on macOS
  • iPhones on Linux and Windows too
  • Android phones and emulators everywhere
  • On Linux: libusb and glibc 2.34+ (Ubuntu 22.04, Debian 12, RHEL 9 and newer)
  • On Windows, for iPhones: the Apple Devices app
made for scripts

Easy to put in a script

  • --json on every command for structured output
  • Exit codes that tell a timeout from a missing element
  • MOBAI_DEVICE to pin the device once
  • mobai test runs .mob scripts and Maestro flows
  • Free on one device. Pro for more devices at once

Install it and list your devices.