Skip to main content

The command line

mobium is one binary. Every command below is a tool of the same layer an MCP client and the five client libraries call, so a command and a method cannot answer differently — the command's page links the same tool on every other surface.

Mobium automates mobile apps — native, hybrid, cross-platform and pages in a
mobile browser — on Android emulators and phones, iOS simulators
and iPhones, using the same map/@ref workflow as vibium:

mobium map && mobium tap @e1 && mobium map

Global flags​

Every command takes these.

FlagTypeWhat it does

--json prints the tool's structured answer. A command that fails prints error: … on stderr and exits with the status of its error's code: 2 invalid_argument; 3 no_device, device_not_ready, toolchain_missing; 4 no_such_element, ambiguous_locator, element_not_reachable, no_such_context, no_such_alert; 5 unsupported; 6 timeout; 7 not_confirmed; 1 anything else.

Commands​

CommandWhat it does
mobium accessibilityRead the device's accessibility settings, or change one for the session
mobium alertRead a system dialog, or answer it
mobium appearanceRead or change the device's light/dark setting
mobium appsList the apps installed on the device
mobium auditRun the platform's own accessibility audit on the screen in front (iOS)
mobium backgroundSend the app in front away for a while, and bring it back
mobium batchRun several tools in order, in one call
mobium batteryRead the battery: level, charging state, what it is plugged into
mobium biometricEnroll and present a face or finger (emulators and simulators)
mobium bootStart an emulator or a simulator, and wait until it has booted
mobium callSimulate an incoming call
mobium checkTick a checkbox or turn a switch on
mobium clear-dataDelete an app's data and leave it installed
mobium clipboardRead the device clipboard, or write it
mobium contextSwitch context, or show the current one
mobium contextsList automatable contexts (native shell and WebViews)
mobium cookiesRead, set or clear the current WebView's cookies
mobium crashesList the crashes the device recorded, or read one in full
mobium currentShow the app in the foreground
mobium daemonManage the background daemon
mobium devicesList running emulators and devices
mobium dialogsDeclare how to answer a dialog that gets in an action's way
mobium doctorCheck that the environment mobium needs is present
mobium double-tapTap an element or a point twice, as one gesture
mobium downloadBring back a file from where the device keeps downloads, or list them
mobium dragDrag something onto something else
mobium evalRun a JavaScript expression in the current WebView
mobium fillClear an element and type text into it
mobium findFind elements matching a locator, without tapping
mobium grantGrant permissions so no dialog blocks the flow
mobium gridLook at the grid MOBIUM_GRID names: its nodes, devices, leases and queue
mobium hit-testAsk UIKit whether a tap on the target would reach it (iOS)
mobium hookCall a hook the app registered with its gray-box library
mobium inspectSee the screen, the locator for anything on it, and record what you do as a test
mobium installInstall an app from a local .apk or .app
mobium keyboardRead, type into, press a key on, or hide the soft keyboard
mobium launchBring an app to the foreground
mobium localeRead or set the language one app runs in
mobium locationRead where the device thinks it is, or move it
mobium lockRead whether the screen is locked, or lock and unlock it
mobium logsRead the WebView console, or the device's own log
mobium long-pressPress and hold an element or a point
mobium mapMap actionable elements on screen with @refs
mobium mcpRun as an MCP server on stdio
mobium networkRead or set network conditions: offline, latency, bandwidth (Android)
mobium notificationsRead the notification shade, post to it, or open it
mobium openOpen a URL or deep link
mobium orientationRead which way the screen is turned, or turn it
mobium pressPress a hardware button
mobium press-dragHold one thing with a finger and drag a second finger elsewhere
mobium press-tapHold one thing with a finger and tap another with a second
mobium recordRecord the screen to a video
mobium reset-permissionsPut permissions back to their defaults
mobium revokeDeny permissions, to test the app without them
mobium rotateTurn two fingers about an element or the screen
mobium screenRead the screen, or make the device pretend to be a different one
mobium screenshotCapture the device screen as PNG
mobium scroll-toScroll until an element is on screen
mobium sessionStart or end the session on a device
mobium shakeShake the device (emulators and simulators)
mobium show-reportOpen the last HTML test report
mobium shutdownShut down an emulator or a simulator, its session ended first
mobium smsDeliver a simulated text message
mobium sourcePrint the raw hierarchy, as the device-side server sent it
mobium stateSay whether an app is in front, in the background, not running or not installed
mobium storageSave, restore or clear the current WebView's cookies and web storage
mobium swipeSwipe the screen, or an element
mobium tapTap an element or a point
mobium terminateStop a running app
mobium testRun *.test.json tests on the devices mobium.config.json names
mobium textRead the text on screen, or of one element
mobium timeRead the device's clock, in its own zone
mobium timezoneRead the device timezone, or change it
mobium traceRecord a session as a trace, in Vibium's record format
mobium typeType text into an element, after what it holds
mobium uncheckClear a checkbox or turn a switch off
mobium uninstallRemove an app from the device
mobium uploadPut a file where the device keeps downloads, for an app's file picker to find
mobium waitWait for an element to appear, disappear, show text, or reach a state
mobium zoomPinch to zoom, about an element or the screen