Use this skill for Apple Find My lookups via the icloud CLI (pyicloud 2.5.0+).
This is the reliable path for device and family-device location on this Mac.
Run scripts from:
cd /Users/rolandk/.openclaw/workspace/skills/findmy-icloud-cli
Do not hardcode the user's Apple ID in the skill.
Store it once in this deterministic state file:
~/.local/state/icloud-findmy-cli/account.env
Format:
ICLOUD_FINDMY_USERNAME="their.email@example.com"
Use:
./scripts/findmy.sh set-username their.email@example.com
./scripts/findmy.sh show-username
If the username is missing, stop and ask the user once for their Apple ID email. After that, persist it via findmy.sh set-username and reuse the state file.
Check current auth:
./scripts/findmy.sh auth-status
If not logged in:
./scripts/findmy.sh auth-login
That opens the current pyicloud auth flow using the stored username. The user may need to enter password and 2FA.
When the user asks for a person's location in natural language, do not force them to name a device.
Use scripts/person-find.py first.
Do not hardcode real family names into the skill. Store person aliases in a local state file instead:
~/.local/state/icloud-findmy-cli/people-aliases.json
Set aliases with neutral labels such as me, partner, kid, or any user-chosen nickname:
./scripts/findmy.sh set-person-alias me "Roland"
./scripts/findmy.sh set-person-alias partner "Gabriella"
./scripts/findmy.sh show-person-aliases
Default resolution order:
Examples:
./scripts/person-find.py "partner"
./scripts/person-find.py "me"
./scripts/person-find.py "kid"
./scripts/findmy.sh list
This runs:
icloud devices list --username "$USERNAME" --with-family --locate --format json
./scripts/findmy.sh show "Roland’s iPhone 14 Pro"
./scripts/device-find.py "Gabriella"
./scripts/device-find.py "iPhone 14"
The main command returns JSON list entries with fields like:
idnamedisplay_namedevice_classdevice_modelbattery_levelbattery_statuslocation.latitudelocation.longitudelocation.timeStamplocation.horizontalAccuracyPrefer JSON parsing over text scraping.
scripts/person-find.py instead of asking for a device name.people-aliases.json, not hardcoded real names in the skill.findmy.sh list first when broad inspection is needed.findmy.sh show when the exact device name is already known.icloud --help, then re-run findmy.sh auth-login.location: null or stale data.scripts/findmy.sh is the main wrapper for username storage, auth, device list, and device showscripts/state.sh handles deterministic local state storagescripts/device-find.py filters devices by case-insensitive substring matchscripts/person-find.py resolves a person alias/name to the best matching device, preferring iPhone then Watch共 1 个版本