Skip to main content

A CLI for iOS Automation

Project description

Pippin: A Token-Efficient CLI for iOS Automation

Pippin (Simulator Driver) is a command-line interface designed to bridge the gap between Large Language Models (LLMs) and the iOS Simulator. It provides a set of stateless, atomic commands to inspect, interact with, and verify the state of iOS applications running in the Simulator.

Features

  • Token Efficiency: Generates simplified, text-based JSON representations of the UI, allowing LLMs to "see" the screen with minimal token usage.
  • Stateless Actions: Each command is independent, making it easier for agents to reason about the state.
  • Native Wrapper: Orchestrates xcrun simctl and idb for robust automation.

Installation

You can run Pippin directly using uvx (recommended):

uvx pippin --help

Or install it via pip:

pip install pippin

Note: You must have idb (iOS Development Bridge) and Xcode command-line tools installed and configured on your machine.

Usage

Pippin commands follow the structure: pippin [command] [subcommand] [flags]

Vision (Seeing the Screen)

  • Inspect UI: Get a JSON representation of the current screen.
    pippin inspect --interactive-only
    
  • Take Screenshot: Capture the visual state.
    pippin screenshot output.png
    

Interaction (Acting on the App)

  • Tap Element: Tap by accessibility identifier or label text.
    pippin tap "Log In"
    
  • Type Text: Enter text into the focused field.
    pippin type "user@example.com" --submit
    
  • Scroll: Scroll in a direction, optionally until an element is found.
    pippin scroll down --until-visible "Submit"
    
  • Gestures: Perform swipes.
    pippin gesture swipe 100,200 100,400
    

System (Controlling the Environment)

  • Launch App: Launch an app by Bundle ID.
    pippin launch com.example.myapp --clean
    
  • Open URL: Open a deep link.
    pippin open "myapp://settings"
    
  • Permissions: Manage privacy permissions.
    pippin permission camera grant
    
  • Location: Set simulated GPS coordinates.
    pippin location 37.7749 -122.4194
    

Verification (Checking State)

  • Assert: Verify UI state (exists, visible, hidden, text matches).
    pippin assert "Welcome Message" visible
    
  • Logs: Fetch recent app logs.
    pippin logs --crash-report
    
  • File Tree: List files in the app's sandbox.
    pippin tree documents
    

Contributing

  1. Clone the repository.
  2. Install dependencies.
  3. Run tests: python3 -m unittest discover tests

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

pippin_ios-0.1.0.tar.gz (23.7 kB view details)

Uploaded Source

Built Distribution

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

pippin_ios-0.1.0-py3-none-any.whl (29.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pippin_ios-0.1.0.tar.gz
  • Upload date:
  • Size: 23.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.5

File hashes

Hashes for pippin_ios-0.1.0.tar.gz
Algorithm Hash digest
SHA256 51238bf66e6d29f0bcb21221180cd7598f61685e25665bc067a7875eefbcfe0c
MD5 78019759c864d323dfa369f08f280f20
BLAKE2b-256 6f71ad39c0df1f2eb46ac0f6853f72b17ea85cbbd0f1910512f79e14df7a0667

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pippin_ios-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 29.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.5

File hashes

Hashes for pippin_ios-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 06cb1dff42f97bd87c95f36aa3ffdbb93583a36b4bf6991cf3b194688b4e6d0f
MD5 89c1359ed1b744e5aa65ee01b56a6492
BLAKE2b-256 147760324f7f89fb993b83722dbe0974c4c51789294f7e3486275b0fc46e376d

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