mobilecli 0.3.74 → 0.3.76

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 CHANGED
@@ -16,7 +16,7 @@ A universal command-line tool for managing iOS and Android devices, simulators,
16
16
  <img src="https://img.shields.io/github/release/mobile-next/mobilecli">
17
17
  </a>
18
18
  <a href="https://github.com/mobile-next/mobilecli/blob/main/LICENSE">
19
- <img src="https://img.shields.io/badge/license-AGPL v3.0-blue.svg" alt="Mobile MCP is released under the AGPL v3.0 License">
19
+ <img src="https://img.shields.io/badge/license-FSL--1.1--Apache--2.0-blue.svg" alt="mobilecli is released under the FSL-1.1-Apache-2.0 License">
20
20
  </a>
21
21
  </p>
22
22
 
@@ -36,7 +36,9 @@ A universal command-line tool for managing iOS and Android devices, simulators,
36
36
  - **Screencapture video streaming**: Stream mjpeg/h264 video directly from device
37
37
  - **Device Control**: Reboot devices, tap screen coordinates, press hardware buttons
38
38
  - **App Management**: Launch, terminate, install, uninstall, list, and get foreground apps
39
+ - **Filesystem**: Push, pull, list, mkdir, and rm files on-device or in app containers (Android, iOS Simulator)
39
40
  - **Crash Reports**: List and fetch crash reports from iOS and Android devices
41
+ - **Webview Inspection**: List, navigate, query DOM, and evaluate JavaScript in embedded webviews
40
42
 
41
43
  ### 🎯 Platform Support
42
44
 
@@ -221,6 +223,88 @@ Example output for `apps foreground`:
221
223
  }
222
224
  ```
223
225
 
226
+ ### Filesystem 📂
227
+
228
+ Access files on the device or inside an app's data container. Currently supported on **Android** and **iOS Simulator**.
229
+
230
+ ```bash
231
+ # Get the data container path of an app (Android)
232
+ mobilecli apps path <bundle-id> --device <device-id>
233
+
234
+ # List files at any absolute path (defaults to device root if omitted)
235
+ mobilecli fs ls --device <device-id>
236
+ mobilecli fs ls --device <device-id> /sdcard
237
+ mobilecli fs ls --device <device-id> /sdcard/Download
238
+
239
+ # List files inside an app's data container
240
+ mobilecli fs ls --device <device-id> com.example.app
241
+ mobilecli fs ls --device <device-id> com.example.app /Documents
242
+
243
+ # Pull a file from the device to local disk
244
+ mobilecli fs pull --device <device-id> /sdcard/recording.mp4 ./recording.mp4
245
+
246
+ # Pull a file from an app's private container
247
+ mobilecli fs pull --device <device-id> /data/user/0/com.example.app/files/db.sqlite ./db.sqlite
248
+
249
+ # Push a file to the device
250
+ mobilecli fs push --device <device-id> ./config.json /sdcard/config.json
251
+
252
+ # Push a file into an app's private container
253
+ mobilecli fs push --device <device-id> ./config.json /data/user/0/com.example.app/files/config.json
254
+
255
+ # Create a directory
256
+ mobilecli fs mkdir --device <device-id> /sdcard/myfolder
257
+
258
+ # Create a directory and all parent directories
259
+ mobilecli fs mkdir --device <device-id> -p /sdcard/a/b/c
260
+ mobilecli fs mkdir --device <device-id> -p /data/user/0/com.example.app/files/cache/v2
261
+
262
+ # Remove a file
263
+ mobilecli fs rm --device <device-id> /sdcard/old_file.txt
264
+
265
+ # Remove a directory recursively
266
+ mobilecli fs rm --device <device-id> -r /sdcard/myfolder
267
+ mobilecli fs rm --device <device-id> -r /data/user/0/com.example.app/files/cache
268
+ ```
269
+
270
+ Example output for `apps path`:
271
+ ```json
272
+ {
273
+ "status": "ok",
274
+ "data": {
275
+ "path": "/data/user/0/com.example.app"
276
+ }
277
+ }
278
+ ```
279
+
280
+ Example output for `fs ls`:
281
+ ```json
282
+ {
283
+ "status": "ok",
284
+ "data": [
285
+ {
286
+ "name": "files",
287
+ "path": "/data/user/0/com.example.app/files",
288
+ "size": 4096,
289
+ "modTime": "2026-05-11T19:20:00Z",
290
+ "isDir": true
291
+ },
292
+ {
293
+ "name": "shared_prefs",
294
+ "path": "/data/user/0/com.example.app/shared_prefs",
295
+ "size": 4096,
296
+ "modTime": "2026-05-11T12:49:00Z",
297
+ "isDir": true
298
+ }
299
+ ]
300
+ }
301
+ ```
302
+
303
+ **Notes:**
304
+ - Paths under `/data/user/` are accessed via `run-as`, so the app must be debuggable.
305
+ - Pushing to `/data/user/` stages the file through `/data/local/tmp/` then copies it into the container.
306
+ - Pulling binary files (images, databases, DEX files) is fully supported and binary-safe on all platforms.
307
+
224
308
  ### Agent Management 🤖
225
309
 
226
310
  On **iOS**, the on-device agent is required for touch input (taps, swipes, button presses), screen capture streaming, and UI tree inspection. These capabilities are not available through standard iOS tooling without an agent running on the device.
@@ -255,6 +339,66 @@ Example output for `agent status`:
255
339
  }
256
340
  ```
257
341
 
342
+ ### Webview Inspection 🌐
343
+
344
+ Inspect and interact with embedded webviews (`WKWebView` on iOS, `android.webkit.WebView` on Android) running inside native apps.
345
+
346
+ ```bash
347
+ # List embedded webviews in the foreground app
348
+ mobilecli webview list --device <device-id>
349
+
350
+ # Navigate a webview to a URL
351
+ mobilecli webview goto <id> https://example.com --device <device-id>
352
+
353
+ # Reload, go back or forward
354
+ mobilecli webview reload <id> --device <device-id>
355
+ mobilecli webview back <id> --device <device-id>
356
+ mobilecli webview forward <id> --device <device-id>
357
+
358
+ # Get current URL and page title
359
+ mobilecli webview url <id> --device <device-id>
360
+ mobilecli webview title <id> --device <device-id>
361
+
362
+ # Dump the full HTML content of the page
363
+ mobilecli webview content <id> --device <device-id>
364
+
365
+ # Query DOM elements by CSS selector
366
+ mobilecli webview query <id> "button" --device <device-id>
367
+ mobilecli webview query <id> "[data-testid='submit']" --device <device-id>
368
+
369
+ # Evaluate arbitrary JavaScript
370
+ mobilecli webview eval <id> "document.querySelectorAll('a').length" --device <device-id>
371
+
372
+ # Wait for the page to finish loading
373
+ mobilecli webview wait <id> --state load --device <device-id>
374
+ mobilecli webview wait <id> --state domcontentloaded --timeout 5000 --device <device-id>
375
+ ```
376
+
377
+ Example output for `webview list`:
378
+ ```json
379
+ {
380
+ "status": "ok",
381
+ "data": [
382
+ {
383
+ "id": "1",
384
+ "url": "https://example.com",
385
+ "title": "Example Domain"
386
+ }
387
+ ]
388
+ }
389
+ ```
390
+
391
+ Example output for `webview query <id> "button"`:
392
+ ```json
393
+ {
394
+ "status": "ok",
395
+ "data": [
396
+ { "tag": "button", "text": "Sign In", "id": "login-btn", "class": "btn-primary", "value": null, "href": null },
397
+ { "tag": "button", "text": "Cancel", "id": null, "class": "btn-secondary", "value": null, "href": null }
398
+ ]
399
+ }
400
+ ```
401
+
258
402
  ### Crash Reports 💥
259
403
 
260
404
  ```bash
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobilecli",
3
- "version": "0.3.74",
3
+ "version": "0.3.76",
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": {