diff --git a/website/docs/docs/commands.md b/website/docs/docs/commands.md index 39185d289b..bb28931562 100644 --- a/website/docs/docs/commands.md +++ b/website/docs/docs/commands.md @@ -787,6 +787,28 @@ See [Batching](/docs/batching) for payload format, response shape, and usage gui ## App install (in-place) + + +Install an app binary from a path. + +```bash +agent-device install | install [--os ] [--image-tag ] [--device-mode ] [--device-baseline ] [--physical] +``` + +| Option | What it does | +| --- | --- | +| `--os ` | Proxy lease: OS version or range the backend picks the device by (Android: API level); refused without such a backend | +| `--image-tag ` | Proxy lease: Android system image tag the backend picks the device by; refused without such a backend | +| `--device-mode ` | Proxy lease: iOS simulator mode (slim or full) the backend leases; refused without such a backend | +| `--device-baseline ` | Proxy lease: saved device state (baseline) the backend restores on the leased device; refused without such a backend | +| `--physical` | Proxy lease: ask the backend for a physical device instead of a simulator or emulator; refused without such a backend | + +Supported targets: [Install and reinstall an app](/docs/capabilities#apps-and-devices). + +Exact behavior: `agent-device help install`. + + + ```bash agent-device install com.example.app ./build/app.apk --platform android agent-device install com.example.app ./build/MyApp.app --platform ios @@ -802,6 +824,28 @@ agent-device install ./build/entry-default-signed.hap --platform harmonyos ## App reinstall (fresh state) + + +Replace an installed app with a new build. + +```bash +agent-device reinstall [--os ] [--image-tag ] [--device-mode ] [--device-baseline ] [--physical] +``` + +| Option | What it does | +| --- | --- | +| `--os ` | Proxy lease: OS version or range the backend picks the device by (Android: API level); refused without such a backend | +| `--image-tag ` | Proxy lease: Android system image tag the backend picks the device by; refused without such a backend | +| `--device-mode ` | Proxy lease: iOS simulator mode (slim or full) the backend leases; refused without such a backend | +| `--device-baseline ` | Proxy lease: saved device state (baseline) the backend restores on the leased device; refused without such a backend | +| `--physical` | Proxy lease: ask the backend for a physical device instead of a simulator or emulator; refused without such a backend | + +Supported targets: [Install and reinstall an app](/docs/capabilities#apps-and-devices). + +Exact behavior: `agent-device help reinstall`. + + + ```bash agent-device reinstall com.example.app ./build/app.apk --platform android agent-device reinstall com.example.app ./build/MyApp.app --platform ios @@ -812,6 +856,28 @@ agent-device reinstall com.example.app ./build/MyApp.app --platform ios ## App uninstall + + +Remove an installed app. + +```bash +agent-device uninstall [--os ] [--image-tag ] [--device-mode ] [--device-baseline ] [--physical] +``` + +| Option | What it does | +| --- | --- | +| `--os ` | Proxy lease: OS version or range the backend picks the device by (Android: API level); refused without such a backend | +| `--image-tag ` | Proxy lease: Android system image tag the backend picks the device by; refused without such a backend | +| `--device-mode ` | Proxy lease: iOS simulator mode (slim or full) the backend leases; refused without such a backend | +| `--device-baseline ` | Proxy lease: saved device state (baseline) the backend restores on the leased device; refused without such a backend | +| `--physical` | Proxy lease: ask the backend for a physical device instead of a simulator or emulator; refused without such a backend | + +Supported targets: [Uninstall an app](/docs/capabilities#apps-and-devices). + +Exact behavior: `agent-device help uninstall`. + + + ```bash agent-device uninstall com.example.app --platform android ``` @@ -822,6 +888,27 @@ agent-device uninstall com.example.app --platform android ## App install from source URL + + +Install app builds from URLs or CI artifacts. + +```bash +agent-device install-from-source | install-from-source --github-actions-artifact +``` + +| Option | What it does | +| --- | --- | +| `--header ` | install-from-source: repeatable HTTP header for URL downloads | +| `--github-actions-artifact ` | install-from-source: GitHub Actions artifact resolved by a remote daemon | +| `--retain-paths` | install-from-source: keep materialized artifact paths after install | +| `--retention-ms ` | install-from-source: retain files for 1-2147483647 ms | + +Supported targets: [Install from a source URL](/docs/capabilities#apps-and-devices). + +Exact behavior: `agent-device help install-from-source`. + + + ```bash agent-device install-from-source https://example.com/builds/app.apk --platform android agent-device install-from-source https://example.com/builds/app.aab --platform android @@ -838,6 +925,20 @@ agent-device install-from-source --github-actions-artifact thymikee/RNCLI83:6635 ## Push notification simulation + + +Deliver a push notification payload. + +```bash +agent-device push +``` + +Supported targets: [Push notification simulation](/docs/capabilities#system-and-hardware). + +Exact behavior: `agent-device help push`. + + + ```bash agent-device push com.example.app ./payload.apns --platform ios agent-device push com.example.app '{"aps":{"alert":"Welcome","badge":1}}' --platform ios @@ -851,6 +952,20 @@ agent-device push com.example.app '{"action":"com.example.app.PUSH","extras":{"t ## App event triggers (app hook) + + +Invoke an app-defined automation event. + +```bash +agent-device trigger-app-event [payloadJson] +``` + +Supported targets: [App event triggers through the app hook](/docs/capabilities#system-and-hardware). + +Exact behavior: `agent-device help trigger-app-event`. + + + ```bash agent-device trigger-app-event screenshot_taken '{"source":"qa"}' ``` @@ -861,6 +976,24 @@ agent-device trigger-app-event screenshot_taken '{"source":"qa"}' ## Settings helpers + + +Change OS settings and app permissions. + +```bash +agent-device settings | settings location set | settings appearance | settings text-size [extra-small|small|medium|large|extra-large|extra-extra-large|extra-extra-extra-large|accessibility-medium|accessibility-large|accessibility-extra-large|accessibility-extra-extra-large|accessibility-extra-extra-extra-large] | settings | settings fingerprint | settings clear-app-state [app-id] | settings reset-keychain clear | settings permission [full|limited] | settings permission [--app ] +``` + +| Option | What it does | +| --- | --- | +| `--app ` | Target an app without opening it: doctor verifies an installed app by id or name; settings applies an app-scoped change (permission, iOS location) to a bundle id or package | + +Supported targets: [System and app settings helpers](/docs/capabilities#system-and-hardware). + +Exact behavior: `agent-device help settings`. + + + ```bash agent-device settings wifi on agent-device settings wifi off @@ -955,6 +1088,38 @@ Permissions: ## App state and app lists + + +Show the foreground app and activity. + +```bash +agent-device appstate +``` + +Supported targets: [Foreground app state](/docs/capabilities#apps-and-devices). + +Exact behavior: `agent-device help appstate`. + + + + + +List installed apps or deferred provider app assets. + +```bash +agent-device apps [--all] +``` + +| Option | What it does | +| --- | --- | +| `--all` | Apps: include system/OEM apps | + +Supported targets: [Installed app list](/docs/capabilities#apps-and-devices). + +Exact behavior: `agent-device help apps`. + + + ```bash agent-device appstate agent-device apps --platform ios