icloudcli reads your on-device data directly — Photos, Messages, Contacts, Notes,
Reminders, Calendar, and Safari. No API token, no login, no cloud round-trip.
Find storage hogs, search every conversation and note, audit your reminders,
and pipe it all to jq or any AI agent with --agent JSON.
Quick Install
Open Source · Apache-2.0
Use cases
Every command runs locally against your on-device databases — no network, no app launch. Pipe to jq or use --agent to wire it into any AI workflow.
AI workflows
Copy a prompt, paste it into Claude, Cursor, Codex, or any agent with terminal access — it runs the commands and handles the rest.
Open source lives on community support. A star takes one second and helps other developers find this tool.
Apache-2.0 · free forever · macOS onlyReference
Every command accepts --json, --compact, --no-color, and --agent (sets all three). The Contacts, Notes, Reminders, Calendar, and Music groups keep a local SQLite cache — run sync once, then every read is instant and offline. Photos, Messages, Safari, Calls, Screen Time, Podcasts, and Mail read their databases directly; iCloud Drive walks the filesystem. Run doctor to see which permissions each group needs.
photos top
Top N heaviest files across all media types. Flags: --limit, --type all|photo|video
Live
photos videos
Largest videos sorted by file size. Flags: --limit, --year, --month
Live
photos storage
Storage breakdown by media type (photo/video) and by year
Live
photos stats
Total item count and total library size
Live
photos delete
Move items to Recently Deleted. Dry run by default; add --confirm to act. Requires Photos.app.
Live
photos download
Export originals to a local folder via Photos.app — downloads from iCloud automatically if needed. Flags: --output, --sensitive, --type all|photo|video, --limit. Files renamed to <UUID>.ext.
Live
photos search
Filter by person, date, type, favorite, or location — pipes straight into download/delete. Flags: --person, --year, --month, --type, --favorites, --has-gps, --near LAT,LON --radius, --keyword
Live
photos ask
Natural language query over your library
Coming
messages list-chats
List conversations by most-recent activity — name, handle, participant count, message count, last preview. Flags: --limit, --since, --include-empty
Live
messages search
Search message bodies — decodes the modern attributedBody blob so post-2020 texts aren't missed. Flags: --chat, --handle, --from-me, --since, --until, --limit
Live
messages stats
Totals, by-year breakdown, and top handles by message count. Flags: --top-handles, --include-tapbacks
Live
messages audit
Deep analysis — unique conversations (DM vs group), longest threads by count and by date span, activity recency, per-chat distribution, from-me vs from-others. Flags: --top
Live
messages export
Export a chat (or --chat all) to JSON with attachment paths. Flags: --out, --since, --until
Live
contacts sync
Pull all contacts from Contacts.app via JXA into a local SQLite cache. Run once; re-run with --force.
Live
contacts list / get / search
List, show one (8-char UUID prefix lookup), or full-text search across name, org, phones, emails, and notes (FTS5).
Live
contacts merge / duplicates
Find likely duplicates (name / phone / email) and merge two contacts — dedupes phones, emails, URLs, addresses. Dry run until --confirm.
Live
contacts create / update / delete
Write back to Contacts.app safely (values passed as out-of-band AppleScript args — no injection). Syncs to iCloud automatically.
Live
contacts analytics
Group by country (E.164 dial-code resolution), email domain, and missing-field coverage.
Live
notes sync
Pull all notes from Notes.app via JXA into a local SQLite cache with folder and account. Password-protected notes expose metadata only.
Live
notes list / get / search
List by most-recently modified, show a full body, or full-text search titles and bodies (FTS5). Flags: --limit
Live
notes analytics
Word/char totals, averages, shared/locked/empty counts, longest note, and a per-folder breakdown.
Live
reminders sync
Pull all reminders from Reminders.app via JXA into a local SQLite cache, with list, priority, due/remind dates.
Live
reminders list
Open by default, soonest-due first. Flags: --list, --completed, --all, --overdue, --upcoming N
Live
reminders get / search
Show one reminder, or full-text search across titles, notes, and lists (FTS5).
Live
reminders analytics
Open / done / overdue, due today and this week, high-priority and flagged, plus a per-list breakdown.
Live
calendar sync
Pull events within a date window via JXA. Flags: --back (days history, default 90), --forward (default 365)
Live
calendar agenda
Upcoming events grouped by day (next 7 by default). Flags: --days, --calendar
Live
calendar list / search
Events in an explicit range (--from/--to), or full-text search across titles, locations, and notes.
Live
calendar analytics
Total events and scheduled hours, per-calendar breakdown, and a busiest-weekday histogram.
Live
safari history
Recently visited pages, most recent first. Reads History.db read-only. Flags: --limit, --domain, --since
Live
safari search / top-sites
Search history by URL and title, or rank the most-visited domains by visit count.
Live
safari bookmarks
List all bookmarks flattened with their folder path (parsed from Bookmarks.plist).
Live
safari reading-list
Saved-for-later articles with date added, preview, and unread state. Flag: --unread
Live
calls list
Recent phone + FaceTime calls, newest first. Flags: --missed, --incoming, --outgoing, --since, --limit
Live
calls search / analytics
Search by number/handle/name; analytics shows in/out/missed, phone vs FaceTime, total talk time, and most-contacted. Names resolve from your synced contacts.
Live
drive status
Summary of iCloud Drive: file count, size on this Mac vs cloud-only, and your top containers.
Live
drive usage
Per-app storage breakdown — see exactly which apps hold your iCloud space (downloaded vs cloud-only).
Live
drive list [subpath]
List entries with per-file local/cloud download state. No special permission — they're your own files.
Live
screentime usage
Top apps by foreground time. Flags: --days, --since, --limit
Live
screentime web / notifications
Top Safari domains by time, and per-app notification counts.
Live
screentime analytics
Window overview: total app time, distinct apps, notifications, most-used app. Knowledge store retains ~4 weeks.
Live
music sync
Cache your Music library (Apple Music / iCloud Music Library) via JXA — name, artist, album, genre, year, play count, rating, loved.
Live
music list / search
Most-played by default (--sort recent|name, --artist), or FTS5 search by name/artist/album/genre.
Live
music playlists / analytics
Playlists with track counts, and library analytics: top artists by plays, top genres, total runtime.
Live
podcasts shows
Your shows, subscribed first, with episode counts. No permission needed — reads your own container.
Live
podcasts episodes
Episodes newest-first. Flags: --show, --downloaded, --unplayed
Live
podcasts analytics
Shows, subscriptions, episodes, downloads, and estimated listening time.
Live
mail list
Messages across every account (envelope metadata, not bodies), newest first. Flags: --unread, --flagged, --from, --since
Live
mail search / mailboxes
Search by subject or sender; list mailboxes with total + unread counts.
Live
mail analytics
Totals, unread, flagged, and your top senders by message volume.
Live
doctor
Pre-flight check — verifies macOS, Photos library + schema, Messages and Safari Full Disk Access, and Automation for the Notes/Reminders/Calendar groups. Run this first.
Live
photos ask
Natural-language queries over your library — the one feature still on the roadmap.
Coming
Get started
Requires macOS 13+. Run icloud-pp-cli doctor after installing to verify your setup.
icloudcli · early access
New iCloud databases unlock regularly. Get a short note when they do — no noise, no marketing.