Skip to main content

Agent-first, session-based CLI for driving mobile apps via Appium

Project description

appium-pilot

An agent-first, session-based CLI for driving native mobile apps via Appium. One verb per invocation, state persisted across calls, output tuned for an LLM agent: snapshot the screen to get element refs, then act on them by ref.

Install

pipx install .          # or: pip install -e .

You also need Node + the Appium server and drivers (appium-pilot does not install them — run appium-pilot doctor to see what's missing):

npm i -g appium
appium driver install uiautomator2   # Android
appium driver install xcuitest       # iOS

Quick start

# Launch an installed Android app (auto-picks a booted emulator)
appium-pilot open --platform android --app-package com.example.app

# Or an iOS Simulator app bundle
appium-pilot open --platform ios --app /path/to/MyApp.app

# Inspect the screen — returns filtered XML with e1..eN refs
appium-pilot snapshot

# Act on a ref from the latest snapshot
appium-pilot tap e7

# Multiple parallel sessions
appium-pilot -s=checkout open --platform ios --app /path/to/MyApp.app

Session state lives under ~/.appium-pilot/ (so any invocation can reattach regardless of cwd). Artifacts you want to find — screenshots and videos — are written to ./appium-pilot/ in the current directory (override with APPIUM_PILOT_OUTPUT).

Use from AI coding agents

A skill ships inside the package so agents discover the commands and drive the CLI themselves. Install it into whichever tool you use — no manual symlink:

appium-pilot skills install                # Claude Code (~/.claude/skills/), the default
appium-pilot skills install --tool cursor  # Cursor       (.cursor/rules/)
appium-pilot skills install --tool copilot # GitHub Copilot (.github/copilot-instructions.md)
appium-pilot skills install --tool agents  # AGENTS.md (the cross-tool standard)
appium-pilot skills install --tool all     # all of the above
appium-pilot skills uninstall --tool all   # remove

claude installs user-level (once, for every project); the others write into the current project. The skill source lives at src/appium_pilot/skilldata/SKILL.md; re-run skills install after editing it.

Platform support

  • macOS — full: iOS Simulator + Android Emulator.
  • Windows / Linux — Android only (iOS needs a Mac). External tools are resolved through shutil.which (honoring PATHEXT, so appium.cmd/adb.exe work) and background processes detach via OS-appropriate flags. On Windows, make is uncommon — run the underlying commands directly (.venv\Scripts\pytest, python -m appium_pilot ...). The Windows path is implemented but not yet exercised on a Windows host.

Testing

Two tiers (see tests/):

make install          # pip install -e ".[dev]"
make test             # fast unit tests, no device — run after every change
make test-e2e-android # device-backed E2E (auto-boots an emulator)
make test-e2e-ios     # device-backed E2E (auto-boots a simulator)
make test-e2e         # both platforms
  • Unit (tests/unit/, ~0.2s, no device): locks in the snapshot filtering, per-platform locators, quoting, output/JSON contract, parsing and config logic. pytest runs only these by default.
  • E2E (tests/e2e/, marked e2e): drives the real CLI against official Appium sample apps — ApiDemos (Android) and TestApp (iOS, built on demand) — covering every command on both platforms. Apps are cached under tests/_apps/; tests skip cleanly if a device/toolchain is unavailable.

Status

All v1 commands implemented and smoke-tested end-to-end on an iOS Simulator (open → snapshot → tap → re-snapshot → screenshot → stale-ref handling → close):

open · close · list · close-all · kill-all · snapshot [--raw] · source · screenshot [ref] · devices · doctor · tap · type · clear · swipe · scroll · press · hide-keyboard · orientation · wait · video-start/video-stop · launch/activate/terminate/background/install/remove/reset.

Targets iOS Simulator + Android Emulator. Deferred to v2: hybrid webview, geolocation, network conditions, deep links, real devices, cloud farms.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

appium_pilot-0.1.0.tar.gz (37.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

appium_pilot-0.1.0-py3-none-any.whl (40.7 kB view details)

Uploaded Python 3

File details

Details for the file appium_pilot-0.1.0.tar.gz.

File metadata

  • Download URL: appium_pilot-0.1.0.tar.gz
  • Upload date:
  • Size: 37.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for appium_pilot-0.1.0.tar.gz
Algorithm Hash digest
SHA256 337a040566df3df8b14ccc0c3c15f868620209b377200d915f627c03a44b7c07
MD5 6d4b248d2c67a92c0053d659053f3d6f
BLAKE2b-256 391339e63bfb75aa198c09661a1d10a831995a27be5bfa7dbd4a6a8b99dd67b0

See more details on using hashes here.

File details

Details for the file appium_pilot-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: appium_pilot-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 40.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for appium_pilot-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f2406b0dd07fa06c02295995dbc1ee828691c7be710c18eb1c7dcc5f11f3a78b
MD5 e7be96d201db40cf928f7c38699e881f
BLAKE2b-256 aadbd977afac4c4c0fc9eed620e8b9f184f27a2f31d6c7af785c5176a69a982a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page