mobilecli 1.0.9 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -96
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# mobilecli
|
|
2
2
|
|
|
3
|
+
**English** | [日本語](README.ja.md) | [简体中文](README.zh-CN.md)
|
|
4
|
+
|
|
3
5
|
A universal command-line tool for managing iOS and Android devices, simulators, emulators and apps from [Mobile Next](https://github.com/mobile-next/).
|
|
4
6
|
|
|
5
7
|
<p align="left">
|
|
@@ -48,40 +50,21 @@ A universal command-line tool for managing iOS and Android devices, simulators,
|
|
|
48
50
|
- **Android SDK** with `adb` in PATH (for Android device support)
|
|
49
51
|
- **Xcode Command Line Tools** (for iOS simulator support on macOS)
|
|
50
52
|
|
|
51
|
-
#### Run instantly with npx
|
|
52
|
-
```bash
|
|
53
|
-
npx mobilecli@latest
|
|
54
|
-
```
|
|
55
|
-
|
|
56
53
|
#### Install globally with npm
|
|
57
54
|
```bash
|
|
58
55
|
npm install -g mobilecli@latest
|
|
59
56
|
```
|
|
60
57
|
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
git clone https://github.com/mobile-next/mobilecli.git
|
|
64
|
-
cd mobilecli
|
|
65
|
-
make build
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
### Install Dependencies
|
|
69
|
-
|
|
70
|
-
#### 🍎 For iOS Simulator Support
|
|
58
|
+
### Agent Setup 🤖
|
|
71
59
|
|
|
72
|
-
|
|
60
|
+
Install `mobilecli` and add the skill so your coding agent knows how to use it:
|
|
73
61
|
|
|
74
|
-
`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.
|
|
75
|
-
|
|
76
|
-
#### 🤖 For Android Support
|
|
77
62
|
```bash
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
# or
|
|
81
|
-
brew install --cask android-platform-tools
|
|
63
|
+
npm install -g mobilecli@latest
|
|
64
|
+
npx skills add https://github.com/mobile-next/mobilecli
|
|
82
65
|
```
|
|
83
66
|
|
|
84
|
-
##
|
|
67
|
+
## CLI Reference
|
|
85
68
|
|
|
86
69
|
### List Connected Devices 🔍
|
|
87
70
|
|
|
@@ -93,33 +76,6 @@ mobilecli devices
|
|
|
93
76
|
mobilecli devices --include-offline
|
|
94
77
|
```
|
|
95
78
|
|
|
96
|
-
Example output:
|
|
97
|
-
```json
|
|
98
|
-
[
|
|
99
|
-
{
|
|
100
|
-
"id": "12345678-1234567890ABCDEF",
|
|
101
|
-
"name": "iPhone 15",
|
|
102
|
-
"platform": "ios",
|
|
103
|
-
"type": "real",
|
|
104
|
-
"state": "online"
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
"id": "Pixel_6",
|
|
108
|
-
"name": "Pixel 6",
|
|
109
|
-
"platform": "android",
|
|
110
|
-
"type": "emulator",
|
|
111
|
-
"state": "online"
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"id": "iPhone_13",
|
|
115
|
-
"name": "iPhone 13",
|
|
116
|
-
"platform": "ios",
|
|
117
|
-
"type": "simulator",
|
|
118
|
-
"state": "offline"
|
|
119
|
-
}
|
|
120
|
-
]
|
|
121
|
-
```
|
|
122
|
-
|
|
123
79
|
**Note**: Offline emulators and simulators can be booted using the `mobilecli device boot` command.
|
|
124
80
|
|
|
125
81
|
### Take Screenshots 📸
|
|
@@ -248,18 +204,6 @@ mobilecli apps uninstall <bundle-id> --device <device-id>
|
|
|
248
204
|
mobilecli apps clear <bundle-id> --device <device-id>
|
|
249
205
|
```
|
|
250
206
|
|
|
251
|
-
Example output for `apps foreground`:
|
|
252
|
-
```json
|
|
253
|
-
{
|
|
254
|
-
"status": "ok",
|
|
255
|
-
"data": {
|
|
256
|
-
"packageName": "com.example.app",
|
|
257
|
-
"appName": "Example App",
|
|
258
|
-
"version": "1.0.0"
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
```
|
|
262
|
-
|
|
263
207
|
### Filesystem 📂
|
|
264
208
|
|
|
265
209
|
Access files on the device or inside an app's data container. Currently supported on **Android** and **iOS Simulator**.
|
|
@@ -304,39 +248,6 @@ mobilecli fs rm --device <device-id> -r /sdcard/myfolder
|
|
|
304
248
|
mobilecli fs rm --device <device-id> -r /data/user/0/com.example.app/files/cache
|
|
305
249
|
```
|
|
306
250
|
|
|
307
|
-
Example output for `apps path`:
|
|
308
|
-
```json
|
|
309
|
-
{
|
|
310
|
-
"status": "ok",
|
|
311
|
-
"data": {
|
|
312
|
-
"path": "/data/user/0/com.example.app"
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
```
|
|
316
|
-
|
|
317
|
-
Example output for `fs ls`:
|
|
318
|
-
```json
|
|
319
|
-
{
|
|
320
|
-
"status": "ok",
|
|
321
|
-
"data": [
|
|
322
|
-
{
|
|
323
|
-
"name": "files",
|
|
324
|
-
"path": "/data/user/0/com.example.app/files",
|
|
325
|
-
"size": 4096,
|
|
326
|
-
"modTime": "2026-05-11T19:20:00Z",
|
|
327
|
-
"isDir": true
|
|
328
|
-
},
|
|
329
|
-
{
|
|
330
|
-
"name": "shared_prefs",
|
|
331
|
-
"path": "/data/user/0/com.example.app/shared_prefs",
|
|
332
|
-
"size": 4096,
|
|
333
|
-
"modTime": "2026-05-11T12:49:00Z",
|
|
334
|
-
"isDir": true
|
|
335
|
-
}
|
|
336
|
-
]
|
|
337
|
-
}
|
|
338
|
-
```
|
|
339
|
-
|
|
340
251
|
**Notes:**
|
|
341
252
|
- Paths under `/data/user/` are accessed via `run-as`, so the app must be debuggable.
|
|
342
253
|
- Pushing to `/data/user/` stages the file through `/data/local/tmp/` then copies it into the container.
|
|
@@ -562,6 +473,7 @@ mobile server start
|
|
|
562
473
|
|
|
563
474
|
curl http://localhost:12000/rpc -XPOST -d '{"jsonrpc":"2.0", "id": 1, "method": "devices", "params": {}}'
|
|
564
475
|
curl http://localhost:12000/rpc -XPOST -d '{"jsonrpc":"2.0", "id": 1, "method": "screenshot", "params": {"deviceId": "your-device-id"}}'
|
|
476
|
+
```
|
|
565
477
|
|
|
566
478
|
## WebSocket Support 🔌
|
|
567
479
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mobilecli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"author": "Mobile Next",
|
|
5
5
|
"description": "A universal command-line tool for managing iOS and Android devices, simulators, emulators and apps",
|
|
6
6
|
"repository": {
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
"mobilecli": "index.js"
|
|
13
13
|
},
|
|
14
14
|
"optionalDependencies": {
|
|
15
|
-
"@mobilenext/mobilecli-darwin-amd64": "1.0.
|
|
16
|
-
"@mobilenext/mobilecli-darwin-arm64": "1.0.
|
|
17
|
-
"@mobilenext/mobilecli-linux-amd64": "1.0.
|
|
18
|
-
"@mobilenext/mobilecli-linux-arm64": "1.0.
|
|
19
|
-
"@mobilenext/mobilecli-windows-amd64": "1.0.
|
|
20
|
-
"@mobilenext/mobilecli-windows-arm64": "1.0.
|
|
15
|
+
"@mobilenext/mobilecli-darwin-amd64": "1.0.10",
|
|
16
|
+
"@mobilenext/mobilecli-darwin-arm64": "1.0.10",
|
|
17
|
+
"@mobilenext/mobilecli-linux-amd64": "1.0.10",
|
|
18
|
+
"@mobilenext/mobilecli-linux-arm64": "1.0.10",
|
|
19
|
+
"@mobilenext/mobilecli-windows-amd64": "1.0.10",
|
|
20
|
+
"@mobilenext/mobilecli-windows-arm64": "1.0.10"
|
|
21
21
|
}
|
|
22
22
|
}
|