Launch offer: up to 30% off annual plans
Waitpid

Documentation

wp_cli

Last updated:Jul 22, 2026

wp_cli is a command-line tool for automating your cloud phones from your own computer. It's scriptable, repeatable, and logs every action.

Install

Grab the binary for your platform from the download center (macOS arm64/x64, Linux x64/arm64, Windows x64). Verify the SHA-256 shown on the page:

shasum -a 256 wp_cli-aarch64-apple-darwin.tar.xz   # must match the checksum on the download page
tar -xJf wp_cli-*.tar.xz && sudo mv wp_cli /usr/local/bin/
wp_cli --version

Shell completions: wp_cli completions zsh > ~/.zfunc/_wp_cli (bash/fish/powershell alike).

Login

Issue a machine token in the console (Automation → API tokens), then:

wp_cli auth login --token wpa_...     # or: printf '%s' "$WP_TOKEN" | wp_cli auth login
wp_cli auth whoami                    # user + scopes

Credentials live in the OS keyring (file fallback with 0600). They never appear in history, logs or errors.

Sessions

wp_cli env list          # devices in your token's range
wp_cli env use E123      # pin current device (like kubectl context)
wp_cli observe status --env E456   # one-off override

Observe & act

wp_cli observe inspect                  # semantic UI tree
wp_cli observe screenshot --out s.png   # screenshot to disk
wp_cli ui tap --text "Sign in"          # element-first targeting
wp_cli ui type --text "你好世界"         # any Unicode, character-perfect
wp_cli ui wait --text Welcome --timeout-ms 8000

Batch across devices

wp_cli batch ui tap --text OK --group 3          # every device in group 3
wp_cli batch app launch --package com.foo --envs E1,E2,E3

Per-device results are isolated — one failure never aborts the rest.

MCP mode (stdio)

wp_cli mcp        # stdio MCP server with the same tool face as the remote endpoint

Use this when your agent runs on the same machine, or when you need connect (local port bridging, local-bridge scope) — the one capability the remote endpoint intentionally omits.