Use CLI on any OS to read-write your iPhone folders (without cloud or cable)
Apple’s iOS is a closed ecosystem, but what if you could access your iPhone folders via the CLI on any device, Linux, Windows, macOS, or Android? This would enable automation and programmability for your iPhone data.
My goal is simple: read-write access to my iPhone via CLI or API, without cloud/internet or connected cable or jailbreaking, or special permissions, and across any OS.
The solution? Running a persistent background WebDAV server on iPhone, which allows wireless file management & automation from other devices.

1. Spinning Up WebDAV Servers
I put together a lightweight (~1MB in download size) iOS app called PocketServer over the weekends for spinning up multiple local HTTP/WebDAV servers that can run persistently in the background, even when you switch apps or lock your iPhone screen.
Get PocketServer from the App Store, tap WebDAV → choose folder and that’s it, you have a local, persistent background WebDAV Server serving your folder, available to other devices within the same network (e.g. same Wifi)
The WebDAV server is Class 1 compliant (Basic), compatible with WebDAV clients like Cyberduck, rclone (GUI & CLI, available on macOS, Windows, and Linux), etc. This guide will use Cyberduck, but rclone works too.
There are other iOS apps for creating WebDAV Servers, the reason I wrote PocketServer: lightweight, dead simple to setup, and most importantly persistent background running.
Disclosure about the pricing: pretty much free to use, without ads. You only need the Pro upgrade ($2.99 one-time purchase, no subscription) for some extra customization.
2. Read/Write with Cyberduck CLI
Cyberduck is a libre server and cloud storage browser for Mac and Windows with support for FTP, SFTP, WebDAV, Amazon S3, OpenStack Swift, Backblaze B2, Microsoft Azure & OneDrive, Google Drive and Dropbox.
Cyberduck CLI (duck) available to Mac, Windows and Linux (as RPM & DEB package).
After setting up WebDAV server on your iPhone, install Cyberduck (GUI or CLI) on your other devices.
These other devices need to be on the same network as your iPhone to access the WebDAV server.
Suppose the WebDAV Server address is: 192.168.1.2:63609
Read
List files & folders:
duck --list http://192.168.1.2:63609/
Download file <file>
to local <folder>
:
(the file should also include its extension as showed in the list command)
duck --download http://192.168.1.2:63609/<file> <folder>/
Download a whole WebDAV folder to local <folder>
:
duck --download http://192.168.1.2:63609/ <folder>/
Write
Upload a whole <folder>
on disk to a WebDAV Server <subfolder>
duck --upload http://192.168.1.2:63609/<subfolder>/ <folder>
Delete a whole WebDAV <subfolder>
duck --delete http://192.168.1.2:63609/<subfolder>
For the full CLI usage, please refer to Cyberduck documentation.
Wrap-Up
With just a few simple steps and no cables or clouds, you can take full control of your iPhone’s files.
You can interact with it through any compatible WebDAV client, integrate it into your workflow or automation.
It’s simple, fast, and can be surprisingly powerful.
Disclosure
I’m the developer of the PocketServer app mentioned in this article and may benefit financially from its use.
However, I have no affiliation with Cyberduck, rclone or their developers. These are simply tools that I find useful and recommend based on personal experience.