@mobilenext/mobilecli 0.0.52 → 0.0.53

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
@@ -26,7 +26,6 @@ A universal command-line tool for managing iOS and Android devices, simulators,
26
26
  </a>
27
27
  </p>
28
28
 
29
-
30
29
  ## Features 🚀
31
30
 
32
31
  - **Device Management**: List, manage, interactive with connected mobile devices
@@ -34,9 +33,9 @@ A universal command-line tool for managing iOS and Android devices, simulators,
34
33
  - **Emulator/Simulator Control**: Boot and shutdown emulators and simulators programmatically
35
34
  - **Screenshot Capture**: Take screenshots from any connected device with format options
36
35
  - **Multiple Output Formats**: Save screenshots as PNG or JPEG with quality control
37
- - **Screencapture video streaming**: Stream mjpeg video directly from device
36
+ - **Screencapture video streaming**: Stream mjpeg/h264 video directly from device
38
37
  - **Device Control**: Reboot devices, tap screen coordinates, press hardware buttons
39
- - **App management**: Launch app, terminate apps. Install and uninstall coming next ⏭️
38
+ - **App Management**: Launch app, terminate apps, install and uninstall
40
39
 
41
40
  ## Installation 📦
42
41
 
@@ -77,24 +76,6 @@ Xcode is required. Make sure you have it installed with the runtimes relevant fo
77
76
  brew install --cask android-platform-tools
78
77
  ```
79
78
 
80
- ## WebSocket Support 🔌
81
-
82
- 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.
83
-
84
- ```bash
85
- # Start the server (default port 12000)
86
- mobilecli server start
87
-
88
- # Connect and send requests using wscat
89
- wscat -c ws://localhost:12000/ws
90
- > {"jsonrpc":"2.0","id":1,"method":"devices","params":{}}
91
- < {"jsonrpc":"2.0","id":1,"result":[...]}
92
- > {"jsonrpc":"2.0","id":2,"method":"screenshot","params":{"deviceId":"your-device-id"}}
93
- < {"jsonrpc":"2.0","id":2,"result":{...}}
94
- ```
95
-
96
- **Note**: `screencapture` is not supported over WebSocket - use the HTTP `/rpc` endpoint for video streaming.
97
-
98
79
  ## Usage
99
80
 
100
81
  ### List Connected Devices 🔍
@@ -196,6 +177,36 @@ mobilecli io text --device <device-id> 'hello world'
196
177
  - `VOLUME_UP`, `VOLUME_DOWN` - Volume up and down
197
178
  - `DPAD_UP`, `DPAD_DOWN`, `DPAD_LEFT`, `DPAD_RIGHT`, `DPAD_CENTER` - D-pad controls (Android only)
198
179
 
180
+ ## HTTP API 🔌
181
+
182
+ ***mobilecli*** provides an http interface for all the functionality that is available through command line. As a matter of fact, it is preferable to
183
+ use mobilecli as a webserver, so it can cache and keep tunnels alive, speeding up your interactions with the mobile device or simulator/emulator.
184
+
185
+ ```bash
186
+ # Start the server (default port 12000)
187
+ mobile server start
188
+
189
+ curl http://localhost:12000/rpc -XPOST -d '{"jsonrpc":"2.0", "id": 1, "method": "devices", "params": {}}'
190
+ curl http://localhost:12000/rpc -XPOST -d '{"jsonrpc":"2.0", "id": 1, "method": "screenshot", "params": {"deviceId": "your-device-id"}}'
191
+
192
+ ## WebSocket Support 🔌
193
+
194
+ ***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.
195
+
196
+ ```bash
197
+ # Start the server (default port 12000)
198
+ mobilecli server start
199
+
200
+ # Connect and send requests using wscat
201
+ wscat -c ws://localhost:12000/ws
202
+ > {"jsonrpc":"2.0","id":1,"method":"devices","params":{}}
203
+ < {"jsonrpc":"2.0","id":1,"result":[...]}
204
+ > {"jsonrpc":"2.0","id":2,"method":"screenshot","params":{"deviceId":"your-device-id"}}
205
+ < {"jsonrpc":"2.0","id":2,"result":{...}}
206
+ ```
207
+
208
+ **Note**: `screencapture` is not supported over WebSocket - use the HTTP `/rpc` endpoint for video streaming.
209
+
199
210
  ## Platform-Specific Notes
200
211
 
201
212
  ### iOS Real Devices
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mobilenext/mobilecli",
3
- "version": "0.0.52",
3
+ "version": "0.0.53",
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": {