iFetch: The Command Line Tool to Bulk Download Your iCloud Drive
If you've ever needed to get a large chunk of data out of iCloud Drive, you know the pain. The web interface is fine for a file or two, but for a whole project folder or a backup? It's a tedious game of click, wait, download, repeat. What you really want is a simple command to just pull it all down at once.
Enter iFetch. It's a straightforward, open-source command line tool that solves exactly this problem. No more wrestling with the web interface when you need to move your data.
What It Does
iFetch is a Python script that acts as a bridge to your iCloud Drive. You give it a target—a specific file, a folder, or even your entire Drive root—and it will recursively download everything to your local machine. It handles the authentication with Apple's servers and manages the download queue, preserving the folder structure you have in the cloud.
Why It's Cool
The clever part isn't just that it downloads files. It's how it does it. Instead of trying to scrape the iCloud website (a fragile approach that breaks with every UI update), iFetch uses the official icloud Python library. This library taps into the same private API that the iCloud website and apps use, making the tool more reliable and "sanctioned" in its communication.
This approach gives you a stable programmatic interface to a service that famously lacks one. The use cases are pretty clear: developers migrating away from iCloud, creating local backups of cloud-stored projects, or simply wanting to script the synchronization of specific folders to a server or another machine. It turns a manual, GUI-bound process into an automatable, terminal-friendly task.
How to Try It
Getting started is a standard Python affair. You'll need Python 3 and pip installed.
First, clone the repository and install the dependencies:
git clone https://github.com/roshanlam/iFetch.git
cd iFetch
pip install -r requirements.txt
Then, you can run it. On its first run, iFetch will prompt you to authenticate with your Apple ID (it uses two-factor authentication, so have a trusted device handy). After that, downloading is simple.
To download your entire iCloud Drive:
python ifetch.py
To download a specific folder (e.g., Documents/MyProject):
python ifetch.py --directory "Documents/MyProject"
The tool will churn away, downloading everything and saving it to a local iCloud Drive folder in your current directory.
Final Thoughts
iFetch is a classic example of a utility that does one job and does it well. It fills a specific gap for developers and power users who need to interact with their iCloud data in a way Apple doesn't natively provide. It's not a full sync solution, and it's download-only, but for that core task of "get my stuff off iCloud," it's incredibly effective. If you've been looking for a way to liberate your files or just want a local backup without the manual hassle, this script is worth an hour of your time to set up.
@githubprojects
Repository: https://github.com/roshanlam/iFetch