findmy
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFind My (Apple)
Find My (Apple)
Track Apple devices and AirTags via the FindMy.app on macOS. Since Apple doesn't
provide a CLI for FindMy, this skill uses AppleScript to open the app and
screen capture to read device locations.
在macOS上通过FindMy.app追踪Apple设备和AirTag。由于Apple并未为FindMy提供CLI,本技能使用AppleScript打开应用并通过屏幕截图读取设备位置。
Prerequisites
前提条件
- macOS with Find My app and iCloud signed in
- Devices/AirTags already registered in Find My
- Screen Recording permission for terminal (System Settings → Privacy → Screen Recording)
- Optional but recommended: Install for better UI automation:
peekaboobrew install steipete/tap/peekaboo
- 已登录iCloud且安装Find My应用的macOS系统
- 设备/AirTag已在Find My中注册
- 终端拥有屏幕录制权限(系统设置 → 隐私与安全性 → 屏幕录制)
- 可选但推荐:安装以获得更好的UI自动化效果:
peekaboobrew install steipete/tap/peekaboo
When to Use
使用场景
- User asks "where is my [device/cat/keys/bag]?"
- Tracking AirTag locations
- Checking device locations (iPhone, iPad, Mac, AirPods)
- Monitoring pet or item movement over time (AirTag patrol routes)
- 用户询问“我的[设备/猫/钥匙/包]在哪里?”
- 追踪AirTag位置
- 查看设备位置(iPhone、iPad、Mac、AirPods)
- 长期监控宠物或物品的移动轨迹(AirTag巡逻路线)
Method 1: AppleScript + Screenshot (Basic)
方法1:AppleScript + 截图(基础版)
Open FindMy and Navigate
打开FindMy并导航
bash
undefinedbash
undefinedOpen Find My app
Open Find My app
osascript -e 'tell application "FindMy" to activate'
osascript -e 'tell application "FindMy" to activate'
Wait for it to load
Wait for it to load
sleep 3
sleep 3
Take a screenshot of the Find My window
Take a screenshot of the Find My window
screencapture -w -o /tmp/findmy.png
Then use `vision_analyze` to read the screenshot:vision_analyze(image_url="/tmp/findmy.png", question="What devices/items are shown and what are their locations?")
undefinedscreencapture -w -o /tmp/findmy.png
随后使用`vision_analyze`读取截图内容:vision_analyze(image_url="/tmp/findmy.png", question="What devices/items are shown and what are their locations?")
undefinedSwitch Between Tabs
切换标签页
bash
undefinedbash
undefinedSwitch to Devices tab
Switch to Devices tab
osascript -e '
tell application "System Events"
tell process "FindMy"
click button "Devices" of toolbar 1 of window 1
end tell
end tell'
osascript -e '
tell application "System Events"
tell process "FindMy"
click button "Devices" of toolbar 1 of window 1
end tell
end tell'
Switch to Items tab (AirTags)
Switch to Items tab (AirTags)
osascript -e '
tell application "System Events"
tell process "FindMy"
click button "Items" of toolbar 1 of window 1
end tell
end tell'
undefinedosascript -e '
tell application "System Events"
tell process "FindMy"
click button "Items" of toolbar 1 of window 1
end tell
end tell'
undefinedMethod 2: Peekaboo UI Automation (Recommended)
方法2:Peekaboo UI自动化(推荐)
If is installed, use it for more reliable UI interaction:
peekaboobash
undefined如果已安装,使用它可实现更可靠的UI交互:
peekaboobash
undefinedOpen Find My
Open Find My
osascript -e 'tell application "FindMy" to activate'
sleep 3
osascript -e 'tell application "FindMy" to activate'
sleep 3
Capture and annotate the UI
Capture and annotate the UI
peekaboo see --app "FindMy" --annotate --path /tmp/findmy-ui.png
peekaboo see --app "FindMy" --annotate --path /tmp/findmy-ui.png
Click on a specific device/item by element ID
Click on a specific device/item by element ID
peekaboo click --on B3 --app "FindMy"
peekaboo click --on B3 --app "FindMy"
Capture the detail view
Capture the detail view
peekaboo image --app "FindMy" --path /tmp/findmy-detail.png
Then analyze with vision:vision_analyze(image_url="/tmp/findmy-detail.png", question="What is the location shown for this device/item? Include address and coordinates if visible.")
undefinedpeekaboo image --app "FindMy" --path /tmp/findmy-detail.png
随后使用视觉分析工具解析:vision_analyze(image_url="/tmp/findmy-detail.png", question="What is the location shown for this device/item? Include address and coordinates if visible.")
undefinedWorkflow: Track AirTag Location Over Time
工作流:长期追踪AirTag位置
For monitoring an AirTag (e.g., tracking a cat's patrol route):
bash
undefined用于监控AirTag(例如追踪猫的巡逻路线):
bash
undefined1. Open FindMy to Items tab
1. Open FindMy to Items tab
osascript -e 'tell application "FindMy" to activate'
sleep 3
osascript -e 'tell application "FindMy" to activate'
sleep 3
2. Click on the AirTag item (stay on page — AirTag only updates when page is open)
2. Click on the AirTag item (stay on page — AirTag only updates when page is open)
3. Periodically capture location
3. Periodically capture location
while true; do
screencapture -w -o /tmp/findmy-$(date +%H%M%S).png
sleep 300 # Every 5 minutes
done
Analyze each screenshot with vision to extract coordinates, then compile a route.while true; do
screencapture -w -o /tmp/findmy-$(date +%H%M%S).png
sleep 300 # Every 5 minutes
done
使用视觉分析工具解析每张截图以提取坐标,随后生成轨迹路线。Limitations
局限性
- FindMy has no CLI or API — must use UI automation
- AirTags only update location while the FindMy page is actively displayed
- Location accuracy depends on nearby Apple devices in the FindMy network
- Screen Recording permission required for screenshots
- AppleScript UI automation may break across macOS versions
- FindMy没有CLI或API——必须使用UI自动化
- 仅当FindMy页面处于主动显示状态时,AirTag才会更新位置
- 位置精度取决于FindMy网络中附近的Apple设备
- 截图需要屏幕录制权限
- AppleScript UI自动化可能在不同macOS版本中失效
Rules
规则
- Keep FindMy app in the foreground when tracking AirTags (updates stop when minimized)
- Use to read screenshot content — don't try to parse pixels
vision_analyze - For ongoing tracking, use a cronjob to periodically capture and log locations
- Respect privacy — only track devices/items the user owns
- 追踪AirTag时需保持FindMy应用在前台(最小化后更新会停止)
- 使用读取截图内容——不要尝试解析像素
vision_analyze - 如需持续追踪,使用cronjob定期捕获并记录位置
- 尊重隐私——仅追踪用户拥有的设备/物品