Skip to content

feat(cli): mobilerun cli 0.8 - #548

Draft
lutz-grex wants to merge 71 commits into
developfrom
feat/cli-devx
Draft

lutz-grex wants to merge 71 commits into
developfrom
feat/cli-devx

Conversation

@lutz-grex

@lutz-grex lutz-grex commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

CLI 0.8 changes:

  • One command tree with one spelling per flag. Old names are removed without aliases and point to their replacement.
  • Correct exit codes and JSON output for scripts.
  • Device commands run on mobilerun-core.
  • QR sign-in and Android pairing.
  • Startup in about 170 ms instead of 1.1 s.

The TypeSafe options from #528 are carried over.

Merge only after the next production deploy.

Changes

mobilerun run "TASK"
mobilerun device list|connect|disconnect|pair|setup|ping
mobilerun device tap|swipe|long-press|type|press|screenshot|ui|apps|start
mobilerun auth login [SERVICE] | logout [SERVICE] | status
mobilerun configure | macro replay|list | doctor | env | completion bash|zsh|fish
Before Now
devices device list (-t cloud, --all)
connect, disconnect, setup, ping device connect, device disconnect, device setup, device ping
login, logout, whoami, configure <provider> auth login, auth logout, auth status, auth login <provider>
--cloud, --device-id, --base-url (cloud) -t cloud, -d, --api-url
--ios, --debug -P ios, -v
run --base_url/--api_base, run --steps run -u/--llm-url, run -s/--max-steps
setup --path, setup -pv device setup --apk, --portal-version
  • Flags and environment
    • A short letter means the same thing on every command.
    • Each environment variable is bound to its flag and shown in --help. Precedence: flag, then env, then config, then default.
    • MOBILERUN_API_KEY is read first; MOBILERUN_CLOUD_API_KEY still works.
    • mobilerun env shows every variable with its source. Secrets show only set.
    • Removed: MOBILERUN_DEVICE_TOKEN, DROIDRUN_*.
  • Output
    • Exit codes: 1 for failures, 2 for usage errors, 130 when interrupted. Before, several commands exited 0 on failure.
    • stdout carries data only.
    • -j prints exactly one JSON document, also on errors.
    • Lists and device ui print tab-separated rows.
  • Errors
    • Without adb, local commands exit 1 with the Platform-Tools hint.
    • A persistent rate limit ends a run with exit 1 (one SDK retry per call).
    • Typos and removed names suggest the right command.
    • Cloud 401/403 name the rejected credential.
    • A missing adb gives one clear message.
    • doctor -j returns {"ok", "checks"}.
  • Non-interactive use
    • --no-input on configure and auth login: without a terminal nothing prompts, and the command exits 2.
    • -k - and --token - read secrets from stdin.
  • QR
    • auth login shows a QR code and the link (RFC 8628). It opens the browser only with --browser.
    • New device pair pairs Android over Wi-Fi via QR. The password never appears in arguments or output.
  • Structure
    • main.py is a thin entry point, with one module per command group.
    • Exports load on first use (PEP 562); public import paths are unchanged.
  • Dependencies: mobilerun-core[local]>=1.12.0, mobilerun-sdk 6.1.1, mobilerun-core-local 0.7.2, segno 1.6.6. Version 0.8.0.
  • README rewritten for 0.8, with an upgrade table from 0.7.

Testing

Runtime

  • Staging cloud device: VERIFIED on the final commit. 18 commands, including list, ui, ping, screenshot, input, apps, env binding and error paths.
  • Startup: VERIFIED. --version 167 ms, --help 171 ms (median of 7 runs).
  • UNVERIFIED:
    • local Android/iOS devices
    • device pair and QR scanning
    • run with a real LLM and with TypeSafe
    • provider sign-ins
    • shell completion

Follow-ups

  • Hosted docs still show the 0.7 commands.
  • mobilerun script … follows in its own pull request.

🤖 Generated with Claude Code

@lutz-grex
lutz-grex requested a review from RasulOs November 12, 2026 23:19
@lutz-grex
lutz-grex marked this pull request as draft November 13, 2026 20:34
@lutz-grex
lutz-grex changed the base branch from feat/cli-qr to develop November 13, 2026 20:36
@lutz-grex lutz-grex changed the title feat(cli): improve cli developer experience feat(cli): mobilerun cli 0.8 Nov 13, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants