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 Python SDK Quickstart 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

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 --platform <ios|android> [flags]
FlagDefaultDescription
--platformPlatform: ios or android (required)
--timeout300Idle timeout in seconds
--openfalseOpen the live viewer in your browser after the device is ready
--jsonfalseOutput as JSON
Examples:
revyl device start --platform android
revyl device start --platform ios --open --timeout 600
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)
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

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.
revyl device install [flags]
FlagDefaultDescription
--app-urlURL to download app from (required).apk or .ipa
--bundle-idBundle ID (optional, auto-detected from the binary)
-s-1Session index
--jsonfalseOutput as JSON
Examples:
revyl device install --app-url "https://example.com/app.apk"
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, the MCP install_app tool also accepts a build_version_id so you don’t need to track URLs manually. 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

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 screenshotscreenshot
device installinstall_app
device launchlaunch_app
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

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