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.
Release files for iphonectl 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| iphonectl-0.1.0.tar.gz | 7.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| iphonectl-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.4 kB
Release files / iphonectl-0.1.0.tar.gz
| Download URL | iphonectl-0.1.0.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e361e246941600f59987a78dd8bfdc663e4545952a02083819d041e2c4e01bda
|
|
BLAKE2b-256 checksum How to use checksums |
1145d969ff23aa3246d64a56beebc2e6252016ed196ee267e468dff0191e1101
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / iphonectl-0.1.0-py3-none-any.whl
| Download URL | iphonectl-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
35c1d085e3a89a7d58ea2e163e0eb86be17c0f5cc8f6acddaea3cffdfa185baf
|
|
BLAKE2b-256 checksum How to use checksums |
ed29d8bf0d8acb8b1e37149a768b1356424327f5ab4e1a647f9daac7314e43e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|