icloud-pp-cli
Query your Apple iCloud data from the command line — Photos library storage analysis, iMessage history search and export, largest-file finder, and delete via AppleScript. macOS only. No network calls or iCloud API token required.
What this skill does
<!-- GENERATED FILE — DO NOT EDIT.
This file is a verbatim mirror of library/media-and-entertainment/icloud/SKILL.md,
regenerated post-merge by tools/generate-skills/. Hand-edits here are
silently overwritten on the next regen. Edit the library/ source instead.
See the repository agent guide, section "Generated artifacts: registry.json, cli-skills/". -->
# Apple iCloud — CLI Skill
## Prerequisites: Install the CLI
This skill drives the `icloud-pp-cli` binary. **You must verify the CLI is installed before invoking any command from this skill.** If it is missing, install it first:
1. Install via the Printing Press installer. It defaults binaries to `$HOME/.local/bin` on macOS/Linux and `%LOCALAPPDATA%\Programs\PrintingPress\bin` on Windows:
```bash
npx -y @mvanhorn/printing-press-library install icloud --cli-only
```
2. Verify: `icloud-pp-cli --version`
3. Ensure the reported install directory is on `$PATH` for the agent/runtime that will invoke this skill.
If the `npx` install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.26.3 or newer):
```bash
go install github.com/mvanhorn/printing-press-library/library/media-and-entertainment/icloud/cmd/icloud-pp-cli@latest
```
If `--version` reports "command not found" after install, the runtime cannot see the binary directory on `$PATH`. Do not proceed with skill commands until verification succeeds.
## Pre-flight Check
Always run `doctor` first to confirm your setup:
```bash
icloud-pp-cli doctor
```
Verifies: macOS, Photos.app installed, library path found, database schema valid, asset count queryable, chat.db readable (Full Disk Access).
If your Photos library is in a non-default location:
```bash
icloud-pp-cli doctor --library "/Volumes/External/Photos Library.photoslibrary/database/Photos.sqlite"
```
## Messages: Full Disk Access required
`messages` subcommands read `~/Library/Messages/chat.db` directly, which on
macOS requires Full Disk Access (FDA) for the terminal app invoking the binary.
If a messages command fails with "Full Disk Access not granted", open System
Settings > Privacy & Security > Full Disk Access, add your terminal, quit and
reopen the terminal, and rerun. `doctor` reports FDA state automatically.
## Command Reference
**photos** — Query and manage your Photos library.
- `icloud-pp-cli photos stats` — Quick summary: total items and total library size.
- `icloud-pp-cli photos storage` — Storage breakdown by media type (photo/video) and by year.
- `icloud-pp-cli photos top` — Top heaviest files across all media types.
- `icloud-pp-cli photos videos` — List your largest videos sorted by file size.
- `icloud-pp-cli photos delete <uuid...>` — Move items to Recently Deleted in Photos.app (requires `--confirm`).
- `icloud-pp-cli photos download [uuid...] --output <dir>` — Export originals from iCloud to a local folder. Photos.app downloads from iCloud automatically if Optimize Mac Storage is enabled.
- `icloud-pp-cli photos download --sensitive --confirm --output <dir>` — Export items Apple's on-device ML has flagged as containing nudity (`--confirm` required).
**messages** — Read your iMessage history from `~/Library/Messages/chat.db`. Requires Full Disk Access.
- `icloud-pp-cli messages list-chats` — Chats ordered by most-recent activity. Flags: `--limit`, `--since`, `--include-empty`.
- `icloud-pp-cli messages search <query>` — Full-text search across message bodies (decoded from `attributedBody` when `text` is NULL). Flags: `--chat`, `--handle`, `--from-me`, `--from-others`, `--since`, `--until`, `--limit`.
- `icloud-pp-cli messages stats` — Total messages / chats / handles, by-year breakdown, top N handles. Flags: `--top-handles`, `--include-tapbacks`.
- `icloud-pp-cli messages export --chat <guid|all>` — Export a chat (or every chat) to JSON with attachment paths. Flags: `--out`, `--since`, `--until`, `--include-tapbacks`.
**doctor** — Run pre-flight checks before using any other command.
## Agent Mode
Add `--agent` to any command. Expands to `--json --compact --no-color`.
```bash
icloud-pp-cli photos top --agent
icloud-pp-cli photos storage --agent | jq '.by_year'
icloud-pp-cli photos stats --agent
icloud-pp-cli messages list-chats --limit 10 --agent | jq '[.[] | {chat: .display_name // .chat_identifier, last: .last_message_date}]'
icloud-pp-cli messages search "lunch" --limit 5 --agent
icloud-pp-cli messages stats --agent
icloud-pp-cli messages export --chat <guid> --out /tmp/chat.json
```
Output is always JSON on stdout with no color. Pipe-friendly — commands also auto-detect pipes and switch to JSON without `--agent`. Messages JSON includes a `text_source` field on every row (`decoded`, `text_column`, or `unrecoverable`) so agents can detect coverage gaps from the typedstream decoder.
## Common Workflows
### Find what's eating storage
```bash
# Overview
icloud-pp-cli photos stats
# Breakdown by year and type
icloud-pp-cli photos storage
# Top 25 heaviest files
icloud-pp-cli photos top
# Top 10 largest videos
icloud-pp-cli photos top --limit 10 --type video
```
### Identify and delete large files
```bash
# Get UUIDs of top 5 largest videos
icloud-pp-cli photos top --type video --limit 5 --json | jq -r '.[].uuid'
# Dry run — see what would be deleted
icloud-pp-cli photos delete <uuid>
# Actually move to Recently Deleted
icloud-pp-cli photos delete <uuid> --confirm
# Pipe directly
icloud-pp-cli photos top --type video --limit 5 --json \
| jq -r '.[].uuid' \
| xargs icloud-pp-cli photos delete --confirm
```
### Filter by year
```bash
# Videos from 2022
icloud-pp-cli photos videos --year 2022 --json
# Videos from January 2022
icloud-pp-cli photos videos --year 2022 --month 1 --json
```
### Search a chat history for a phrase
```bash
# Recent messages mentioning "lunch"
icloud-pp-cli messages search "lunch" --since 2026-01-01
# Only messages I sent, last 6 months
icloud-pp-cli messages search "thanks" --from-me --since 2025-11-22
# Find a message in a specific chat
icloud-pp-cli messages search "happy birthday" --chat +15551234567
```
### Export a chat for downstream analysis
```bash
# One chat to stdout
icloud-pp-cli messages export --chat +15551234567
# One chat to a file
icloud-pp-cli messages export --chat +15551234567 --out /tmp/family.json
# Every chat in one document (large)
icloud-pp-cli messages export --chat all --out /tmp/all-messages.json
```
## Exit Codes
| Code | Meaning |
|------|---------|
| 0 | Success |
| 2 | Usage error |
| 10 | Config error (wrong OS, library not found) |
## Direct Use
1. Check installation: `which icloud-pp-cli`
If missing, see Prerequisites above.
2. Run doctor: `icloud-pp-cli doctor`
3. Execute with `--agent` for JSON output:
```bash
icloud-pp-cli <command> [flags] --agent
```
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.