Overview
Interactive mode is designed for the 90/10 user journey—the most common workflow where you:- Start a device session from your terminal
- Type natural language instructions to create test steps
- Watch them execute in real-time on the device
- Iterate quickly with undo, replay, and live preview
- Save your test when you’re satisfied
Quick Start
revyl> prompt where you can type commands.
Starting Interactive Mode
Creating a New Test
| Flag | Description |
|---|---|
--interactive | Enable interactive REPL mode |
--platform | Target platform (required for new tests) |
--build-var | Build to use (e.g., ios-dev) |
--hotreload | Enable hot reload for Expo apps |
--no-open | Skip opening browser, output URL only |
Editing an Existing Test
The REPL Interface
When you start interactive mode, you’ll see:Creating Steps
Natural Language Instructions
Simply type what you want the device to do:Explicit Step Commands
For specific step types, use explicit commands. Each command maps directly to a step type:| Command | Step Type | Description | Example |
|---|---|---|---|
validate <text> | validation | Add assertion/validation step | validate Welcome message is visible |
wait <duration> | wait | Wait for time or condition | wait 3s |
navigate <url> | navigate | Go to URL or deep link | navigate myapp://settings |
back | back | Press the back button | back |
home | go_home | Press the home button | home |
open-app <id> | open_app | Launch app by bundle ID | open-app com.example.app |
kill-app [id] | kill_app | Terminate app (current if no ID) | kill-app |
Session Commands
These commands manage your interactive session:| Command | Aliases | Description |
|---|---|---|
help | ? | Show available commands |
quit | exit, q | Exit interactive mode |
status | - | Show session status (platform, test ID, step count) |
list | ls | Show all recorded steps with pass/fail status |
undo | - | Remove the last step |
save [file] | - | Export test to YAML file (default: test.yaml) |
clear | - | Clear all recorded steps |
replay [n] | - | Re-execute step n (defaults to last step) |
run | - | Execute all steps from the beginning |
Live Preview
The Live preview URL displayed after device startup lets you view the device stream in your browser:- Watch the device screen in real-time
- See step execution alongside the CLI
- Share the session with teammates
Headless Mode
Use--no-open to start a device session without the interactive REPL:
- Starting a device session for browser-based editing
- CI/automation scenarios where you need a device but not the REPL
- Sharing a device session URL with teammates
Hot Reload Integration
Combine interactive mode with hot reload for the fastest development iteration:- Starts your local dev server (e.g., Expo Metro)
- Creates a secure tunnel
- Launches the device with your dev client
- Opens the interactive REPL
- Make code changes locally
- See them reflected instantly on the device
- Create test steps against your latest code
Auto-Save Behavior
Steps are automatically synced to the backend after each successful execution. This means:- Your test is saved in real-time as you build it
- The web dashboard shows your progress live
- You can close the CLI and resume later via
revyl test open
save command exports your test to a local YAML file for version control:
Example Session
Here’s a complete walkthrough of creating a login test:Troubleshooting
Device Takes Too Long to Start
Symptom: “Waiting for device to initialize…” for more than 2 minutes Solutions:- Check your internet connection
- Verify your API key is valid:
revyl auth status - Try a different platform or build
Step Execution Fails
Symptom: Step fails with “Element not found” or similar Solutions:- Use
replayto retry the step - Check the live preview to see the current screen state
- Rephrase your instruction to be more specific
Session Disconnects
Symptom: “WebSocket error” or connection lost Solutions:- The session may have timed out—start a new one
- Check your network connection
- Use Ctrl+C to cleanly exit and restart