Simple CLI for iOS device control - screenshots, apps, files, and more
Project description
phonectl 📱
Simple CLI for iOS device control. Take screenshots, manage apps, browse files, and more.
pip install phonectl
Why?
pymobiledevice3 is incredibly powerful but has a complex CLI with dozens of subcommands. phonectl wraps the most common operations into simple, memorable commands.
Quick Start
# List connected devices
phonectl list
# Take a screenshot
phonectl screenshot -o screen.png
# List installed apps
phonectl apps
# Launch an app
phonectl launch com.apple.mobilesafari
# Kill an app
phonectl kill com.apple.mobilesafari
# Show device info
phonectl info
File Operations
# List files
phonectl files ls /DCIM
# Pull file from device
phonectl files pull /DCIM/photo.jpg ./photo.jpg
# Push file to device
phonectl files push ./data.txt /Documents/data.txt
iOS 17+ Support
iOS 17 changed how USB communication works. You need to start a tunnel daemon first:
# Start tunnel (requires sudo, run in separate terminal)
phonectl tunnel
# Then use other commands normally
phonectl screenshot
All Commands
| Command | Description |
|---|---|
phonectl list |
List connected devices |
phonectl info |
Show device information |
phonectl screenshot |
Take a screenshot |
phonectl apps |
List installed apps |
phonectl launch <bundle_id> |
Launch an app |
phonectl kill <bundle_id> |
Kill an app |
phonectl files ls <path> |
List files |
phonectl files pull <src> <dst> |
Pull file from device |
phonectl files push <src> <dst> |
Push file to device |
phonectl tunnel |
Start tunnel for iOS 17+ |
Options
All commands support:
--udid, -u— Specify device UDID (auto-selects first device if not provided)--help— Show help for any command
Requirements
- macOS or Linux
- Python 3.9+
- iOS device connected via USB
- Device must be trusted (tap "Trust" when prompted)
- For iOS 17+: tunnel daemon must be running
Installation
# From PyPI
pip install phonectl
# From source
git clone https://github.com/marcusbuildsthings-droid/phonectl
cd phonectl
pip install -e .
Examples
Automation Script
#!/bin/bash
# Take screenshots every 5 seconds
while true; do
phonectl screenshot -o "screen_$(date +%s).png"
sleep 5
done
App Testing
# Kill app, relaunch, screenshot
phonectl kill com.myapp.test
phonectl launch com.myapp.test
sleep 2
phonectl screenshot -o test_result.png
Backup Photos
# Pull all photos from DCIM
for file in $(phonectl files ls /DCIM/100APPLE); do
phonectl files pull "/DCIM/100APPLE/$file" "./backup/$file"
done
Troubleshooting
"No devices found"
- Make sure device is connected via USB
- Check that you've tapped "Trust" on the device
- Try unplugging and reconnecting
"Developer mode required"
- Enable Developer Mode on device: Settings → Privacy & Security → Developer Mode
"Permission denied" on iOS 17+
- Run
phonectl tunnelin a separate terminal first (requires sudo)
Screenshot fails
- Make sure Developer Mode is enabled
- For iOS 17+, ensure tunnel is running
For AI Agents / LLMs
See SKILL.md for agent-optimized documentation including:
- Quick command reference table
- Common task patterns
- JSON output format details
- Error handling expectations
This repo is designed to be easily understood by AI coding assistants.
License
MIT
Credits
Built on top of the excellent pymobiledevice3 by doronz88.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file iphonectl-0.1.0.tar.gz.
File metadata
- Download URL: iphonectl-0.1.0.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e361e246941600f59987a78dd8bfdc663e4545952a02083819d041e2c4e01bda
|
|
| MD5 |
eb2360d6eb739405f03ef33830c9ec1c
|
|
| BLAKE2b-256 |
1145d969ff23aa3246d64a56beebc2e6252016ed196ee267e468dff0191e1101
|
File details
Details for the file iphonectl-0.1.0-py3-none-any.whl.
File metadata
- Download URL: iphonectl-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35c1d085e3a89a7d58ea2e163e0eb86be17c0f5cc8f6acddaea3cffdfa185baf
|
|
| MD5 |
59f78cb172da1b4d51b9959cd2b426f9
|
|
| BLAKE2b-256 |
ed29d8bf0d8acb8b1e37149a768b1356424327f5ab4e1a647f9daac7314e43e7
|