mcpField
O
operate-vmos-edge-cli

operate-vmos-edge-cli

github.com/vmos-devCloud & DevOps344 installsUpdated 11w ago
Repository

About operate-vmos-edge-cli

operate-vmos-edge-cli is a skill for operating the VMOS Edge Desktop Electron app through its CLI. It guides Android virtual device management, CDP-based UI automation, and reusable device workflows.

Key features

  1. 01Manage Android virtual devices on edge hosts
  2. 02Automate the desktop UI through CDP
  3. 03Run YAML playbooks and JSON batches
  4. 04Install and verify the CLI
  5. 05Recover from CLI error codes

Use cases

  1. 01Create, start, stop, or delete virtual devices
  2. 02Automate interactions with VMOS Edge Desktop
  3. 03Build repeatable device workflows
  4. 04Diagnose CLI command failures

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/vmos-dev/vmos-edge-skills --skill operate-vmos-edge-cli

After installing, type/operate-vmos-edge-cliin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

agents/
openai.yaml
references/
command-patterns.md
error-recovery.md
invocation-preflight.md
page-map.md
ui-automation.md
scripts/
ensure-installed.mjs

Details

From the project README

Operate VMOS Edge CLI

Overview

CLI tool for controlling the VMOS Edge Desktop Electron app — manage Android virtual devices on edge hosts, automate the desktop UI via CDP, and orchestrate device workflows.

When to Use

  • Creating, starting, stopping, or deleting Android virtual devices on edge hosts
  • Automating the VMOS Edge Desktop Electron UI via CDP
  • Writing YAML playbooks or batch JSON for device workflows
  • Recovering from vmos-edge-cli error codes
  • Installing or verifying the vmos-edge-cli tool

Not for: raw ADB commands, Appium, Android Studio emulators, or any non-VMOS Android tooling.

Preflight

GATE — complete before any other command. Do not skip.

# 1. Node.js 18+ required
node --version

# 2. Check CLI
vmos-edge-cli --version

# 3. If CLI missing → install
npm i -g @vmosedge/cli

# 4. Verify
vmos-edge-cli schema
Check failsAction
node not foundStop. Tell user to install Node.js 18+.
npm not foundStop. Tell user to install npm (bundled with Node.js).
vmos-edge-cli not foundRun npm i -g @vmosedge/cli, then verify with schema.
schema fails after installReport error and stop. Do not improvise fallbacks.

Do not substitute node dist/main.js, pnpm build, or pnpm link. The only supported install path is npm i -g @vmosedge/cli.

The manual steps above and the automated script (scripts/ensure-installed.mjs) run the same flow — use either. See invocation-preflight.md for platform paths and edge cases.

Critical Rules

  1. ALWAYS ui state to inspect, NEVER screenshot — state is free and structured. screenshot costs vision tokens. Only screenshot when user asks to save an image.
  2. ALWAYS ui click/type to interact, NEVER eval to click/type — eval bypasses scroll and CDP fallback, fails on off-screen elements.
  3. ALWAYS ui state after page changes — after click, goto, back. Never reuse stale indices.
  4. ALWAYS batch consecutive safe actions — if each step is safe regardless of others' results, batch them. Never run them as separate calls.
  5. NEVER mix mutating commands in one batch — create, delete, start, stop, reset each as a separate direct call. Check result before issuing the next command. One command may target multiple items (device start id1 id2, --count 5) — the boundary is between commands, not between targets.
  6. ALWAYS schema before writing batch/YAML — never guess param names. Positional CLI args have different names in batch/YAML that are not guessable. Run schema <domain> to discover exact names and types.
  7. Every device/image command needs --host <ip> — host commands take <ip> as positional arg.

Core Workflow

The app stays running between commands — no need to app start every time.

  1. Preflight → see Preflight section above. Must pass before continuing.
  2. Inspect → ui state, device list, host info, etc.
  3. Act → direct for single/mutating, batch for consecutive safe actions, run for reusable flows
  4. Parse → success: read data. Failure: branch on code (see error-recovery.md)
  5. Verify → ui state after page changes, ui form-state after typing, device info after mutations

Quick Reference

ContextFormatExample
Terminalvmos-edge-cli <domain> <method>vmos-edge-cli ui eval "1+1"
YAML action:domain.methodaction: ui.eval
batch JSONdomain.method{"action":"ui.eval"}
YAML variable${{ expr }}${{ devices[0].id }}
batch variable$expr$devices[0].id

Terminal uses spaces. YAML and batch use dots. Variable syntax is not interchangeable.

Reference Map

Use the Read tool on these files when the condition applies — do not work from memory.

Common Pitfalls

MistakeFix
ui screenshot to inspect pageUse ui state — free, structured, has [N] indices
ui eval "el.click()"Use ui click <N> — handles scroll + CDP fallback
Reuse indices after page navigationRun ui state again to get fresh indices
host check 10.0.0.5 then host info 10.0.0.5 as 2 callsBatch them: one call, both safe to run unconditionally
Guess batch/YAML param names from CLI syntaxPositional args have different names. Run schema <domain> first
device create then device start in one batchNever — different mutating commands must be separate calls
Type into field without verifyingui form-state after typing to confirm value
app start on every commandApp persists — check app status first
ui state output too long on complex pageui state --interactive-only, or batch with interactiveOnly: true
Skip preflight, run CLI commands directlyCLI may not be installed. Always run Preflight gate first

Comments

Markdown supported