{"id":28711971,"url":"https://github.com/mobile-next/mobilecli","last_synced_at":"2026-02-14T19:04:33.922Z","repository":{"id":298117960,"uuid":"998960153","full_name":"mobile-next/mobilecli","owner":"mobile-next","description":"Universal command-line tool for managing iOS and Android devices, simulators, emulators and apps","archived":false,"fork":false,"pushed_at":"2026-02-01T20:51:02.000Z","size":518,"stargazers_count":106,"open_issues_count":12,"forks_count":8,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-02T04:37:47.194Z","etag":null,"topics":["adb","android","cli","commandline-tool","ctl","emulators","ios","simulators","xcode"],"latest_commit_sha":null,"homepage":"https://mobilenexthq.com","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mobile-next.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-09T14:20:29.000Z","updated_at":"2026-02-01T20:50:57.000Z","dependencies_parsed_at":"2025-07-02T14:24:37.766Z","dependency_job_id":"c760e59a-c5b7-4eb9-9f85-619c92c72abd","html_url":"https://github.com/mobile-next/mobilecli","commit_stats":null,"previous_names":["mobile-next/mobilectl","mobile-next/mobilecli"],"tags_count":42,"template":false,"template_full_name":null,"purl":"pkg:github/mobile-next/mobilecli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mobile-next%2Fmobilecli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mobile-next%2Fmobilecli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mobile-next%2Fmobilecli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mobile-next%2Fmobilecli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mobile-next","download_url":"https://codeload.github.com/mobile-next/mobilecli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mobile-next%2Fmobilecli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29194007,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T07:37:03.739Z","status":"ssl_error","status_checked_at":"2026-02-07T07:37:03.029Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adb","android","cli","commandline-tool","ctl","emulators","ios","simulators","xcode"],"created_at":"2025-06-14T22:42:28.873Z","updated_at":"2026-02-07T12:02:30.779Z","avatar_url":"https://github.com/mobile-next.png","language":"Go","readme":"# mobilecli\n\nA universal command-line tool for managing iOS and Android devices, simulators, emulators and apps from [Mobile Next](https://github.com/mobile-next/).\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/mobile-next/mobilecli\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/stars/mobile-next/mobilecli\" alt=\"Mobile Next Stars\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/mobile-next/mobilecli\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/contributors/mobile-next/mobilecli?color=green\" alt=\"Mobile Next Downloads\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@mobilenext/mobilecli\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/dm/@mobilenext/mobilecli?logo=npm\u0026style=flat\u0026color=red\" alt=\"npm\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/mobile-next/mobilecli/releases\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/release/mobile-next/mobilecli\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/mobile-next/mobilecli/blob/main/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/license-AGPL v3.0-blue.svg\" alt=\"Mobile MCP is released under the AGPL v3.0 License\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"http://mobilenexthq.com/join-slack\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/join-Slack-blueviolet?logo=slack\u0026style=flat\" alt=\"Slack community channel\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## Features 🚀\n\n- **Device Management**: List, manage, interactive with connected mobile devices\n- **Cross-Platform Support**: Works with iOS physical devices, iOS simulators, Android devices, and Android emulators\n- **Emulator/Simulator Control**: Boot and shutdown emulators and simulators programmatically\n- **Screenshot Capture**: Take screenshots from any connected device with format options\n- **Multiple Output Formats**: Save screenshots as PNG or JPEG with quality control\n- **Screencapture video streaming**: Stream mjpeg/h264 video directly from device\n- **Device Control**: Reboot devices, tap screen coordinates, press hardware buttons\n- **App Management**: Launch, terminate, install, uninstall, list, and get foreground apps\n\n### 🎯 Platform Support\n\n| Platform | Supported |\n|----------|:---------:|\n| iOS Real Device | ✅ |\n| iOS Simulator | ✅ |\n| Android Real Device | ✅ |\n| Android Emulator | ✅ |\n\n## Installation 📦\n\n#### Prerequisites 📋\n- **Android SDK** with `adb` in PATH (for Android device support)\n- **Xcode Command Line Tools** (for iOS simulator support on macOS)\n\n#### Run instantly with npx\n```bash\nnpx @mobilenext/mobilecli@latest\n```\n\n#### Install globally with npm\n```bash\nnpm install -g @mobilenext/mobilecli@latest\n```\n\n#### Install from Source 🛠️\n```bash\ngit clone https://github.com/mobile-next/mobilecli.git\ncd mobilecli\nmake build\n```\n\n### Install Dependencies\n\n#### 🍎 For iOS Simulator Support\n\nXcode is required. Make sure you have it installed with the runtimes relevant for you installed. You will have to create Simulators and have them booted before `mobilecli` can use them.\n\n`mobilecli` will automatically install an agent on the device that is required for functions such as tapping on elements, pressing buttons and streaming screen capture.\n\n#### 🤖 For Android Support\n```bash\n# Install Android SDK and ensure adb is in PATH\n# Download from: https://developer.android.com/studio/command-line/adb\n# or\nbrew install --cask android-platform-tools\n```\n\n## Usage\n\n### List Connected Devices 🔍\n\n```bash\n# List all online devices and simulators\nmobilecli devices\n\n# List all devices including offline emulators and simulators\nmobilecli devices --include-offline\n```\n\nExample output:\n```json\n[\n  {\n    \"id\": \"12345678-1234567890ABCDEF\",\n    \"name\": \"iPhone 15\",\n    \"platform\": \"ios\",\n    \"type\": \"real\",\n    \"state\": \"online\"\n  },\n  {\n    \"id\": \"Pixel_6\",\n    \"name\": \"Pixel 6\",\n    \"platform\": \"android\",\n    \"type\": \"emulator\",\n    \"state\": \"online\"\n  },\n  {\n    \"id\": \"iPhone_13\",\n    \"name\": \"iPhone 13\",\n    \"platform\": \"ios\",\n    \"type\": \"simulator\",\n    \"state\": \"offline\"\n  }\n]\n```\n\n**Note**: Offline emulators and simulators can be booted using the `mobilecli device boot` command.\n\n### Take Screenshots 📸\n\n```bash\n# Take a PNG screenshot (default)\nmobilecli screenshot --device \u003cdevice-id\u003e\n\n# Take a JPEG screenshot with custom quality\nmobilecli screenshot --device \u003cdevice-id\u003e --format jpeg --quality 80\n\n# Save to specific path\nmobilecli screenshot --device \u003cdevice-id\u003e --output screenshot.png\n\n# Output to stdout\nmobilecli screenshot --device \u003cdevice-id\u003e --output -\n```\n\n### Stream Screen 🎥\n\n```bash\nmobilecli screencapture --device \u003cdevice-id\u003e --format mjpeg | ffplay -\n```\n\nNote that screencapture is one way. You will have to use `io tap` commands to tap on the screen.\n\n### Device Control 🎮\n\n```bash\n# Boot an offline emulator or simulator\nmobilecli device boot --device \u003cdevice-id\u003e\n\n# Shutdown a running emulator or simulator\nmobilecli device shutdown --device \u003cdevice-id\u003e\n\n# Reboot a device\nmobilecli device reboot --device \u003cdevice-id\u003e\n\n# Tap at coordinates (x,y)\nmobilecli io tap --device \u003cdevice-id\u003e 100,200\n\n# Long press at coordinates (x,y) with optional duration in milliseconds\nmobilecli io longpress --device \u003cdevice-id\u003e 100,200\nmobilecli io longpress --device \u003cdevice-id\u003e 100,200 --duration 2000\n\n# Press hardware buttons\nmobilecli io button --device \u003cdevice-id\u003e HOME\nmobilecli io button --device \u003cdevice-id\u003e VOLUME_UP\nmobilecli io button --device \u003cdevice-id\u003e POWER\n\n# Send text\nmobilecli io text --device \u003cdevice-id\u003e 'hello world'\n```\n\n### Supported Hardware Buttons\n\n- `HOME` - Home button\n- `BACK` - Back button (Android only)\n- `POWER` - Power button\n- `VOLUME_UP`, `VOLUME_DOWN` - Volume up and down\n- `DPAD_UP`, `DPAD_DOWN`, `DPAD_LEFT`, `DPAD_RIGHT`, `DPAD_CENTER` - D-pad controls (Android only)\n\n### App Management 📱\n\n```bash\n# List installed apps on device\nmobilecli apps list --device \u003cdevice-id\u003e\n\n# Get currently foreground app\nmobilecli apps foreground --device \u003cdevice-id\u003e\n\n# Launch an app\nmobilecli apps launch \u003cbundle-id\u003e --device \u003cdevice-id\u003e\n\n# Terminate an app\nmobilecli apps terminate \u003cbundle-id\u003e --device \u003cdevice-id\u003e\n\n# Install an app (.apk for Android, .ipa for iOS, .zip for iOS Simulator)\nmobilecli apps install \u003cpath\u003e --device \u003cdevice-id\u003e\n\n# Uninstall an app\nmobilecli apps uninstall \u003cbundle-id\u003e --device \u003cdevice-id\u003e\n```\n\nExample output for `apps foreground`:\n```json\n{\n  \"status\": \"ok\",\n  \"data\": {\n    \"packageName\": \"com.example.app\",\n    \"appName\": \"Example App\",\n    \"version\": \"1.0.0\"\n  }\n}\n```\n\n## HTTP API 🔌\n\n***mobilecli*** provides an http interface for all the functionality that is available through command line. As a matter of fact, it is preferable to\nuse mobilecli as a webserver, so it can cache and keep tunnels alive, speeding up your interactions with the mobile device or simulator/emulator.\n\n```bash\n# Start the server (default port 12000)\nmobile server start\n\ncurl http://localhost:12000/rpc -XPOST -d '{\"jsonrpc\":\"2.0\", \"id\": 1, \"method\": \"devices\", \"params\": {}}'\ncurl http://localhost:12000/rpc -XPOST -d '{\"jsonrpc\":\"2.0\", \"id\": 1, \"method\": \"screenshot\", \"params\": {\"deviceId\": \"your-device-id\"}}'\n\n## WebSocket Support 🔌\n\n***mobilecli*** includes a WebSocket server that allows multiple requests over a single connection using the same JSON-RPC 2.0 format as the HTTP API.\n\n```bash\n# Start the server (default port 12000)\nmobilecli server start\n\n# Connect and send requests using wscat\nwscat -c ws://localhost:12000/ws\n\u003e {\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"devices\",\"params\":{}}\n\u003c {\"jsonrpc\":\"2.0\",\"id\":1,\"result\":[...]}\n\u003e {\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"screenshot\",\"params\":{\"deviceId\":\"your-device-id\"}}\n\u003c {\"jsonrpc\":\"2.0\",\"id\":2,\"result\":{...}}\n```\n\n**Note**: `screencapture` is not supported over WebSocket - use the HTTP `/rpc` endpoint for video streaming.\n\n## Platform-Specific Notes\n\n### iOS Real Devices\n- Currently requires that you install and run WebDriverAgent manually. You may change the BUNDLE IDENTIFIER, and *mobilecli* will be able to launch it if needed, as long as the identifier ends with `*.WebDriverAgent`.\n\n## Development 👩‍💻\n\n### Building 🛠️\n\nPlease refer to (docs/TESTING.md) for further instructions regarding testing *mobilecli* locally.\n\n```bash\nmake lint\nmake build\nmake test\n```\n\n## Support 💬\n\nFor issues and feature requests, please use the [GitHub Issues](https://github.com/mobile-next/mobilecli/issues) page.\n\nBe sure to \u003ca href=\"http://mobilenexthq.com/join-slack\"\u003ejoin our slack channel\u003c/a\u003e today 💜\n\nTo learn more about \u003ca href=\"https://mobilenexthq.com/\"\u003eMobile Next\u003c/a\u003e and what we're building, \u003ca href=\"https://mobilenexthq.com/#newsletter\"\u003esubscribe to our newsletter\u003c/a\u003e.\n\n","funding_links":[],"categories":["HarmonyOS"],"sub_categories":["Windows Manager"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmobile-next%2Fmobilecli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmobile-next%2Fmobilecli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmobile-next%2Fmobilecli/lists"}