# Command Reference

## Device management[​](#device-management "Direct link to Device management")

```
# List all booted devices

mobilecli devices



# List all devices including offline ones

mobilecli devices --include-offline --platform ios --type simulator



# Boot an offline emulator/simulator

mobilecli device boot --device <device-id>



# Shutdown a running emulator/simulator

mobilecli device shutdown --device <device-id>



# Reboot a device

mobilecli device reboot --device <device-id>



# Get device info (OS, version, screen size)

mobilecli device info --device <device-id>



# Get/set device orientation

mobilecli device orientation get --device <device-id>

mobilecli device orientation set --device <device-id> landscape
```

## App management[​](#app-management "Direct link to App management")

```
# Launch an app

mobilecli apps launch --device <device-id> com.example.app



# Terminate an app

mobilecli apps terminate --device <device-id> com.example.app



# List installed apps

mobilecli apps list --device <device-id>



# Install an app (.apk for Android, .ipa/.zip for iOS)

mobilecli apps install --device <device-id> /path/to/app.apk



# Uninstall an app

mobilecli apps uninstall --device <device-id> com.example.app
```

## Screen & media[​](#screen--media "Direct link to Screen & media")

```
# Take a PNG screenshot

mobilecli screenshot --device <device-id> -o screen.png



# Take a JPEG screenshot with quality setting

mobilecli screenshot --device <device-id> -o screen.jpg -f jpeg -q 85



# Stream screen capture (MJPEG)

mobilecli screencapture --device <device-id> -f mjpeg | ffplay -
```

## Input/output[​](#inputoutput "Direct link to Input/output")

```
# Tap at coordinates

mobilecli io tap --device <device-id> 100,200



# Long press at coordinates

mobilecli io longpress --device <device-id> 100,200



# Swipe from one point to another

mobilecli io swipe --device <device-id> 100,200,300,400



# Press hardware button (HOME, VOLUME_UP, VOLUME_DOWN, POWER)

mobilecli io button --device <device-id> HOME



# Send text input

mobilecli io text --device <device-id> "Hello World"
```

## Utilities[​](#utilities "Direct link to Utilities")

```
# Open a URL or deep link

mobilecli url --device <device-id> https://example.com



# Dump UI tree

mobilecli dump ui --device <device-id>
```

## Server mode[​](#server-mode "Direct link to Server mode")

```
# Start HTTP/WebSocket server

mobilecli server start --listen localhost:12000 --cors
```

This exposes all MobileCLI functionality via JSON-RPC over HTTP POST and WebSocket.

## Common flags[​](#common-flags "Direct link to Common flags")

| Flag            | Description                                 |
| --------------- | ------------------------------------------- |
| `--device <id>` | Target device ID (from `mobilecli devices`) |
| `-v, --verbose` | Enable verbose output                       |
| `--help`        | Show help for any command                   |
