Skip to main content
The revyl device command group lets you provision cloud-hosted mobile devices, install apps, and interact with them directly from your terminal. Every command has an equivalent MCP tool for AI agent integration.
If you want task-oriented onboarding first, use Device Quickstart, then Device Scripting Guide or Device Troubleshooting.

Overview

Device sessions are cloud-hosted Android or iOS devices that you can control remotely. The typical lifecycle is:
  1. Start a session with revyl device start
  2. Install an app with revyl device install
  3. Interact using tap, type, swipe, and other action commands
  4. Stop the session with revyl device stop
Sessions auto-terminate after 5 minutes of inactivity (configurable with --timeout).

AI-Powered Grounding

Action commands like tap, type, and swipe support natural language targeting. Instead of specifying pixel coordinates, describe the element you want to interact with:
revyl device tap --target "Sign In button"
revyl device type --target "email input field" --text "[email protected]"
revyl device swipe --target "product list" --direction down
The CLI takes a screenshot, sends your description to the AI grounding model, and resolves it to pixel coordinates automatically. You can also pass raw --x and --y coordinates as an override.

Multi-Session Support

You can run multiple device sessions simultaneously. Sessions are indexed starting at 0, and one session is always marked as “active”:
revyl device start --platform android    # Session 0 (active)
revyl device start --platform ios        # Session 1
revyl device use 1                       # Switch active to session 1
revyl device tap --target "button" -s 0  # Target session 0 explicitly
Session indices are stable — stopping session 0 does not renumber session 1. The first started session is automatically set as the active session. If the active session is stopped, the CLI switches to the lowest remaining index. For detailed workflows (CLI, MCP, Python SDK), cross-client sync, and troubleshooting, see the Multi-Session Guide.

Common Flags

These flags are shared across most device commands:
FlagShortDefaultDescription
--jsonfalseOutput results as JSON
-s-1Session index to target (-1 = active session)

Session Management

revyl device start

Provision and start a new cloud device session.
revyl device start [flags]
FlagDefaultDescription
--platformiosPlatform: ios or android
--timeout300Idle timeout in seconds
--openfalseOpen the live viewer in your browser after the device is ready
--app-idApp ID to resolve latest build from
--app-urlDirect app artifact URL (.apk/.ipa/.zip)
--build-version-idBuild version ID to install
--app-linkDeep link to launch after app start
--devicefalseInteractively select device model and OS version
--device-modelTarget device model (e.g. "iPhone 16")
--os-versionTarget OS version (e.g. "iOS 18.5")
--jsonfalseOutput as JSON
Examples:
revyl device start
revyl device start --platform android --open --timeout 600
revyl device start --platform ios --device-model "iPhone 16" --os-version "iOS 18.5"
The response includes a viewer_url you can open in your browser to watch the device live.

revyl device stop

Stop one or all device sessions.
revyl device stop [flags]
FlagDefaultDescription
-s-1Session index to stop (-1 = active session)
--allfalseStop all sessions
--jsonfalseOutput as JSON
Examples:
revyl device stop              # Stop active session
revyl device stop -s 2         # Stop session at index 2
revyl device stop --all        # Stop all sessions

revyl device list

List all active device sessions.
revyl device list [flags]
FlagDefaultDescription
--jsonfalseOutput as JSON
Output columns: # (index, * marks active), PLATFORM, STATUS, SESSION ID, UPTIME.

revyl device use

Switch the active session to a different index.
revyl device use <index>
Example:
revyl device use 2    # Make session 2 the active session

revyl device info

Show details about a device session: session ID, platform, viewer URL, and uptime.
revyl device info [flags]
FlagDefaultDescription
-s-1Session index (-1 = active session)
--jsonfalseOutput as JSON

revyl device doctor

Run diagnostics on auth, session health, worker reachability, and device connectivity.
revyl device doctor [flags]
FlagDefaultDescription
-s-1Session index (-1 = active session)
--jsonfalseOutput as JSON
Checks performed:
  1. Authentication (API key / login status)
  2. Active session existence
  3. Worker reachability
  4. Device connectivity (via health endpoint)
  5. Lists all active sessions with markers

Device Actions

All action commands support two targeting modes:
  • Grounded (default): Pass --target "element description" and coordinates are resolved via AI
  • Raw coordinates: Pass --x and --y for direct pixel targeting
Describe what you see on screen. Prefer visible text/labels ("the 'Sign In' button"), visual characteristics ("blue rounded rectangle"), or spatial anchors ("text area below the 'Subject:' line"). Avoid abstract UI jargon.

revyl device tap

Tap an element by description or coordinates.
revyl device tap [flags]
FlagDefaultDescription
--targetElement description (AI grounded)
--x0X coordinate (raw)
--y0Y coordinate (raw)
-s-1Session index
--jsonfalseOutput as JSON
Examples:
revyl device tap --target "Sign In button"
revyl device tap --x 540 --y 960

revyl device double-tap

Double-tap an element by description or coordinates.
revyl device double-tap [flags]
FlagDefaultDescription
--targetElement description (AI grounded)
--x0X coordinate (raw)
--y0Y coordinate (raw)
-s-1Session index
--jsonfalseOutput as JSON

revyl device long-press

Long press an element with configurable duration.
revyl device long-press [flags]
FlagDefaultDescription
--targetElement description (AI grounded)
--x0X coordinate (raw)
--y0Y coordinate (raw)
--duration1500Press duration in milliseconds
-s-1Session index
--jsonfalseOutput as JSON
Example:
revyl device long-press --target "message bubble" --duration 2000

revyl device type

Type text into an element. Taps the target first, then inputs the text.
revyl device type [flags]
FlagDefaultDescription
--targetElement description (AI grounded)
--x0X coordinate (raw)
--y0Y coordinate (raw)
--textText to type (required)
--clear-firsttrueClear the field before typing
-s-1Session index
--jsonfalseOutput as JSON
Examples:
revyl device type --target "email input field" --text "[email protected]"
revyl device type --x 540 --y 400 --text "hello" --clear-first=false

revyl device swipe

Swipe from an element in a direction.
revyl device swipe [flags]
FlagDefaultDescription
--targetElement description (AI grounded)
--x0X coordinate (raw)
--y0Y coordinate (raw)
--directionDirection: up, down, left, right (required)
--duration500Swipe duration in milliseconds
-s-1Session index
--jsonfalseOutput as JSON
Swipe direction semantics:
DirectionFinger MovementContent Effect
upFinger moves upScrolls content down (reveals below)
downFinger moves downScrolls content up (reveals above)
leftFinger moves leftScrolls content right
rightFinger moves rightScrolls content left
Example:
revyl device swipe --target "product list" --direction down --duration 1000

revyl device drag

Drag from one point to another using raw coordinates.
revyl device drag [flags]
FlagDefaultDescription
--start-x0Starting X coordinate
--start-y0Starting Y coordinate
--end-x0Ending X coordinate
--end-y0Ending Y coordinate
-s-1Session index
--jsonfalseOutput as JSON
drag only supports raw coordinates, not AI grounding. Take a screenshot first and validate your start/end points before running the drag.
Example:
revyl device drag --start-x 100 --start-y 500 --end-x 100 --end-y 200

revyl device pinch

Pinch or zoom an element.
revyl device pinch [flags]
FlagDefaultDescription
--targetElement description (AI grounded)
--x0X coordinate (raw)
--y0Y coordinate (raw)
--scale2Zoom scale (>1 zooms in, <1 zooms out)
--duration300Pinch duration in milliseconds
-s-1Session index
--jsonfalseOutput as JSON
Examples:
revyl device pinch --target "map" --scale 1.5
revyl device pinch --target "photo" --scale 0.5   # Zoom out

revyl device clear-text

Clear text in an input element.
revyl device clear-text [flags]
FlagDefaultDescription
--targetElement description (AI grounded)
--x0X coordinate (raw)
--y0Y coordinate (raw)
-s-1Session index
--jsonfalseOutput as JSON
Example:
revyl device clear-text --target "Search field"

Control Commands

revyl device wait

Pause for a fixed duration.
revyl device wait [flags]
FlagDefaultDescription
--duration-ms1000Wait duration in milliseconds
-s-1Session index
--jsonfalseOutput as JSON
Example:
revyl device wait --duration-ms 2000

revyl device back

Press the Android back button.
revyl device back [flags]
FlagDefaultDescription
-s-1Session index
--jsonfalseOutput as JSON
This command only works on Android devices. It will return an error on iOS.

revyl device key

Send a non-printable key to the focused field.
revyl device key [flags]
FlagDefaultDescription
--keyKey to send: ENTER or BACKSPACE
-s-1Session index
--jsonfalseOutput as JSON
Examples:
revyl device key --key ENTER
revyl device key --key BACKSPACE

revyl device shake

Trigger a shake gesture on the device.
revyl device shake [flags]
FlagDefaultDescription
-s-1Session index
--jsonfalseOutput as JSON

revyl device home

Return to the device home screen.
revyl device home [flags]
FlagDefaultDescription
-s-1Session index
--jsonfalseOutput as JSON

revyl device kill-app

Kill the installed app on the device.
revyl device kill-app [flags]
FlagDefaultDescription
-s-1Session index
--jsonfalseOutput as JSON

revyl device open-app

Open a system app by name or bundle ID.
revyl device open-app [flags]
FlagDefaultDescription
--appApp name (e.g. settings, safari, chrome) or raw bundle ID (required)
-s-1Session index
--jsonfalseOutput as JSON
Examples:
revyl device open-app --app settings
revyl device open-app --app safari
revyl device open-app --app com.google.chrome.ios

revyl device navigate

Open a URL or deep link on the device.
revyl device navigate [flags]
FlagDefaultDescription
--urlURL or deep link to open (required)
-s-1Session index
--jsonfalseOutput as JSON
Examples:
revyl device navigate --url https://example.com
revyl device navigate --url "myapp://settings/profile"

revyl device set-location

Set the device GPS coordinates.
revyl device set-location [flags]
FlagDefaultDescription
--lat0Latitude (-90 to 90) (required)
--lon0Longitude (-180 to 180) (required)
-s-1Session index
--jsonfalseOutput as JSON
Example:
revyl device set-location --lat 37.7749 --lon -122.4194

revyl device download-file

Download a file to the device from a URL.
revyl device download-file [flags]
FlagDefaultDescription
--urlURL to download from (required)
--filenameOptional destination filename on the device
-s-1Session index
--jsonfalseOutput as JSON
Example:
revyl device download-file --url https://example.com/report.pdf --filename report.pdf

Vision

revyl device screenshot

Capture a screenshot of the device screen.
revyl device screenshot [flags]
FlagDefaultDescription
--outOutput file path (e.g. screen.png)
-s-1Session index
--jsonfalseOutput as JSON
Examples:
revyl device screenshot --out screen.png
revyl device screenshot -s 1 --out ~/Desktop/ios-screen.png

App Management

revyl device install

Install an app on the device from a remote URL or a previously uploaded build.
revyl device install [flags]
FlagDefaultDescription
--app-urlURL to download app from (.apk or .ipa)
--build-version-idBuild version ID from a previous upload; download URL is resolved automatically
--bundle-idBundle ID (optional, auto-detected from the binary)
-s-1Session index
--jsonfalseOutput as JSON
Provide either --app-url or --build-version-id, not both. Examples:
revyl device install --app-url "https://example.com/app.apk"
revyl device install --build-version-id bv_abc123
revyl device install --app-url "https://example.com/app.ipa" --bundle-id com.example.app
If you’ve already uploaded a build with revyl build upload, use --build-version-id so you don’t need to track URLs manually. The MCP install_app tool also accepts this flag. See MCP Setup for details.

revyl device launch

Launch an installed app by bundle ID.
revyl device launch [flags]
FlagDefaultDescription
--bundle-idApp bundle ID to launch (required)
-s-1Session index
--jsonfalseOutput as JSON
Example:
revyl device launch --bundle-id com.example.app

Live Steps

Execute individual test steps against an active device session without creating a full test. These commands use the same AI-powered step execution engine used in revyl test run.

revyl device instruction

Run one natural-language instruction step on the active device. The AI agent interprets the description and performs the necessary actions (tap, type, swipe, etc.) to complete it.
revyl device instruction <description> [flags]
FlagDefaultDescription
-s-1Session index
--jsonfalseOutput as JSON
Examples:
revyl device instruction "Open Settings and tap Wi-Fi"
revyl device instruction "Log in with [email protected] and password secret123"
revyl device instruction "Scroll down and tap the 'Save Changes' button"

revyl device validation

Run one natural-language validation step. Asserts that a condition is true on the current screen.
revyl device validation <description> [flags]
FlagDefaultDescription
-s-1Session index
--jsonfalseOutput as JSON
Examples:
revyl device validation "Verify the Settings title is visible"
revyl device validation "The inbox shows at least one unread message"
revyl device validation "The price displayed is $9.99"

revyl device extract

Run one natural-language extract step. Pulls data from the current screen and returns it.
revyl device extract <description> [flags]
FlagDefaultDescription
--variable-nameOptional variable name to tag the extracted value for downstream use
-s-1Session index
--jsonfalseOutput as JSON
Examples:
revyl device extract "Extract the visible account email"
revyl device extract "Extract the total price" --variable-name total_price

revyl device code-execution

Run a code execution step on the active device session. Three modes:
  1. By script ID: revyl device code-execution <script-id>
  2. From local file: revyl device code-execution --file ./script.py --runtime python
  3. Inline code: revyl device code-execution --code "print('hello')" --runtime python
Modes 2 and 3 create an ephemeral script on the backend, execute it, then clean up.
revyl device code-execution [script-id] [flags]
FlagDefaultDescription
--fileRun code from a local file (creates ephemeral script)
--codeRun inline code string (creates ephemeral script)
--runtimeScript runtime for --file/--code: python, javascript, typescript, or bash
-s-1Session index
--jsonfalseOutput as JSON
Examples:
revyl device code-execution script_abc123
revyl device code-execution --file ./tests/check_state.py --runtime python
revyl device code-execution --code "console.log('ok')" --runtime javascript

Utilities

revyl device report

View the report for the active device session, including steps executed, actions taken, video URL, and status.
revyl device report [flags]
FlagDefaultDescription
-s-1Session index
--jsonfalseOutput as JSON

revyl device targets

List available device models and OS versions for each platform.
revyl device targets [flags]
FlagDefaultDescription
--platformFilter to a specific platform: ios or android
--jsonfalseOutput as JSON
Examples:
revyl device targets
revyl device targets --platform ios

revyl device history

Show recent device session history from the server.
revyl device history [flags]
FlagDefaultDescription
--limit20Maximum number of sessions to show
--jsonfalseOutput as JSON

MCP Tool Mapping

Every CLI device command has a corresponding MCP tool for AI agent integration:
CLI CommandMCP Tool
device startstart_device_session
device stopstop_device_session
device listlist_device_sessions
device useswitch_device_session
device infoget_session_info
device doctordevice_doctor
device tapdevice_tap
device double-tapdevice_double_tap
device long-pressdevice_long_press
device typedevice_type
device swipedevice_swipe
device dragdevice_drag
device pinchdevice_pinch
device clear-textdevice_clear_text
device screenshotscreenshot
device installinstall_app
device launchlaunch_app
device waitdevice_wait
device backdevice_back
device keydevice_key
device shakedevice_shake
device homedevice_go_home
device kill-appdevice_kill_app
device open-appdevice_open_app
device navigatedevice_navigate
device set-locationdevice_set_location
device download-filedevice_download_file
device instructiondevice_instruction
device validationdevice_validation
device extractdevice_extract
device code-executiondevice_code_execution
device reportget_session_report
See MCP Server Setup for configuration and usage with AI coding tools.

Examples

Start a device, install an app, and interact

revyl device start --platform android --open
revyl device install --app-url "https://example.com/myapp.apk"
revyl device launch --bundle-id com.example.myapp
revyl device screenshot --out before.png
revyl device tap --target "Sign In button"
revyl device type --target "email field" --text "[email protected]"
revyl device type --target "password field" --text "secret123"
revyl device tap --target "Log In"
revyl device screenshot --out after.png
revyl device stop

Use live steps for a complex flow

revyl device start --platform ios --open
revyl device install --app-url "https://example.com/myapp.ipa"
revyl device instruction "Log in with [email protected] and navigate to the Settings page"
revyl device validation "The Settings page header is visible"
revyl device extract "Extract the current plan name" --variable-name plan
revyl device stop

Multi-session testing

revyl device start --platform android    # Session 0
revyl device start --platform ios        # Session 1

# Interact with Android (session 0)
revyl device tap --target "Get Started" -s 0

# Interact with iOS (session 1)
revyl device tap --target "Get Started" -s 1

revyl device stop --all

Target an element before acting

revyl device screenshot --out before-submit.png
revyl device tap --target "Submit button"
revyl device screenshot --out after-submit.png

Troubleshooting

Device won’t start

  1. Check authentication: revyl auth status
  2. Run diagnostics: revyl device doctor
  3. Verify your account has available device slots

”no active device session”

Sessions auto-terminate after the idle timeout (default 5 minutes). Start a new session with revyl device start.

Grounding can’t find the element

  1. Take a screenshot to see what’s actually on screen: revyl device screenshot --out debug.png
  2. Use more specific descriptions: "blue 'Next' button" instead of "button"
  3. Fall back to raw coordinates with --x/--y when needed

Actions seem to miss their target

The device resolution may differ from what you expect. Capture a fresh screenshot and switch to raw --x/--y targeting for precise control.

Next Steps

Device Quickstart

Task-oriented onboarding with your first device session.

MCP Server Setup

Connect device tools to your AI coding agent.

Dev Loop Guide

Run focused local verification loops with cloud devices.

Command Reference

Full reference for all CLI commands.