mobilecli 1.0.7 → 1.0.9

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.
Files changed (2) hide show
  1. package/README.md +21 -13
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -2,25 +2,16 @@
2
2
 
3
3
  A universal command-line tool for managing iOS and Android devices, simulators, emulators and apps from [Mobile Next](https://github.com/mobile-next/).
4
4
 
5
- <p align="center">
5
+ <p align="left">
6
6
  <a href="https://github.com/mobile-next/mobilecli">
7
7
  <img src="https://img.shields.io/github/stars/mobile-next/mobilecli" alt="Mobile Next Stars" />
8
8
  </a>
9
- <a href="https://github.com/mobile-next/mobilecli">
10
- <img src="https://img.shields.io/github/contributors/mobile-next/mobilecli?color=green" alt="Mobile Next Downloads" />
11
- </a>
12
9
  <a href="https://www.npmjs.com/package/mobilecli">
13
10
  <img src="https://img.shields.io/npm/dm/mobilecli?logo=npm&style=flat&color=red" alt="npm">
14
11
  </a>
15
- <a href="https://github.com/mobile-next/mobilecli/releases">
16
- <img src="https://img.shields.io/github/release/mobile-next/mobilecli">
17
- </a>
18
12
  <a href="https://github.com/mobile-next/mobilecli/blob/main/LICENSE">
19
13
  <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
14
  </a>
21
- </p>
22
-
23
- <p align="center">
24
15
  <a href="http://mobilenext.ai/join-slack">
25
16
  <img src="https://img.shields.io/badge/join-Slack-blueviolet?logo=slack&style=flat" alt="Slack community channel" />
26
17
  </a>
@@ -146,6 +137,9 @@ mobilecli screenshot --device <device-id> --scale 0.5
146
137
  # Limit the largest dimension to 800 pixels, keeping aspect ratio
147
138
  mobilecli screenshot --device <device-id> --max-size 800
148
139
 
140
+ # Crop to a region (x,y,width,height in screen points), applied before scaling
141
+ mobilecli screenshot --device <device-id> --clip 10,80,300,200
142
+
149
143
  # Save to specific path
150
144
  mobilecli screenshot --device <device-id> --output screenshot.png
151
145
 
@@ -352,7 +346,7 @@ Example output for `fs ls`:
352
346
 
353
347
  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.
354
348
 
355
- On **Android**, most features work without the agent, but installing it enables non-ASCII text input (e.g. Japanese, Chinese, Korean, emoji) which is not possible through `adb` alone.
349
+ On **Android**, no agent is needed. Running `mobilecli agent status` on an Android device simply reports that.
356
350
 
357
351
  ```bash
358
352
  # Check if the agent is installed on a device
@@ -541,10 +535,24 @@ npx skills add mobile-next/mobilecli -g
541
535
 
542
536
  Then ask your agent things like "take a screenshot of my emulator" or "tap the login button" — the skill triggers automatically.
543
537
 
538
+ ## Daemon ⚙️
539
+
540
+ Every device command talks to a per-user background daemon that keeps discovered devices, iOS tunnels and on-device agents alive between invocations, so only the first command pays the discovery cost. The daemon starts automatically on the first device command (`mobilecli --help` and `--version` never start it) and exits after 30 minutes without requests.
541
+
542
+ ```bash
543
+ # Inspect or control it explicitly
544
+ mobilecli daemon status
545
+ mobilecli daemon stop
546
+
547
+ # Run it in the foreground (e.g. under a service manager), with a custom idle timeout
548
+ mobilecli daemon start --idle-timeout 0
549
+ ```
550
+
551
+ The CLI and daemon talk JSON-RPC over a unix domain socket in `~/.mobilecli/` (override with `MOBILECLI_HOME`); the daemon's log is `~/.mobilecli/daemon.log`. A daemon left over from an older mobilecli version is restarted automatically. `auth login` and `auth logout` stop a running daemon so it picks up the new credentials.
552
+
544
553
  ## HTTP API 🔌
545
554
 
546
- ***mobilecli*** provides an http interface for all the functionality that is available through command line. As a matter of fact, it is preferable to
547
- use mobilecli as a webserver, so it can cache and keep tunnels alive, speeding up your interactions with the mobile device or simulator/emulator.
555
+ ***mobilecli*** provides an http interface for all the functionality that is available through command line. The server is a thin front for the daemon above, so HTTP clients and the CLI share one set of devices and tunnels.
548
556
 
549
557
  For the full list of available JSON-RPC methods and their parameters, see the [OpenRPC specification](https://github.com/mobile-next/mobile-openrpc/blob/main/mobilecli/openrpc.md).
550
558
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobilecli",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
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.7",
16
- "@mobilenext/mobilecli-darwin-arm64": "1.0.7",
17
- "@mobilenext/mobilecli-linux-amd64": "1.0.7",
18
- "@mobilenext/mobilecli-linux-arm64": "1.0.7",
19
- "@mobilenext/mobilecli-windows-amd64": "1.0.7",
20
- "@mobilenext/mobilecli-windows-arm64": "1.0.7"
15
+ "@mobilenext/mobilecli-darwin-amd64": "1.0.9",
16
+ "@mobilenext/mobilecli-darwin-arm64": "1.0.9",
17
+ "@mobilenext/mobilecli-linux-amd64": "1.0.9",
18
+ "@mobilenext/mobilecli-linux-arm64": "1.0.9",
19
+ "@mobilenext/mobilecli-windows-amd64": "1.0.9",
20
+ "@mobilenext/mobilecli-windows-arm64": "1.0.9"
21
21
  }
22
22
  }