0x01
mole 很棒,但是他只支持 mac 。我想要让我的 claude code 或者 codex 去帮我整理 iPhone 的相册,优化下存储空间,顺便也做个备份。
所以我做了一个 iPhone 版本的 mole ,命名为:iMole。

0x02
iMole 的使用非常简单,把你的 iPhone 连接上你的电脑(最好是 mac 电脑),然后让 agent 自己使用 iMole 帮你检测优化。
直接把 github 地址 https://github.com/chenhg5/imole 丢给你的 agent 去安装执行。
比如:你可以告诉你的 agent ,帮我把去年在日本的照片备份下网盘吧,然后他就会帮你开始操作了。

使用示例:
# 查看存储占用
imole scan --summary
# 找出最大的视频文件
imole scan --top 20 --only videos
# 备份 90 天前的视频
imole backup --to ~/iphone-backup --only videos --older-than 90d --dry-run
imole backup --to ~/iphone-backup --only videos --older-than 90d
# 删除已备份的文件
imole clean --manifest ~/iphone-backup/manifest.json --yes
查看空间统计:
imole scan --summary
Scanning media…
Querying app storage…
iMole Storage Summary
Media: 28.9GiB · 9960 files
Photos: 10.3GiB · 6579 files
Videos: 18.6GiB · 3261 files
Top video: IMG_7523.MOV · 327.7MiB
Device: 2.0GiB free · 0.9% free
Apps: 35.9GiB · 49 apps
App code: 13.9GiB
App data: 22.0GiB
Top app: 网易云音乐 · 3.2GiB
Recommended next steps:
imole scan --top 30 --only videos
imole scan apps --top 20
查看占用最多的图片或视频:
imole scan --top 10 --only videos
Scanning device… (may take ~15 s for USB)
Device ready: imagecapture:山哥本山
Top 30 Videos
1. IMG_7523.MOV 327.7MiB 2025-07-30
2. IMG_7510.MOV 306.8MiB 2025-07-29
3. IMG_4109.MOV 270.8MiB 2024-09-15
4. IMG_9441.MOV 267.3MiB 2026-04-06
5. VRQA7650.MP4 260.3MiB 2025-07-20
6. XCGC7110.MP4 172.9MiB 2025-07-18
7. IMG_4113.MOV 151.7MiB 2024-09-15
8. AYXW6719.MP4 143.3MiB 2025-07-18
9. IMG_5865.MOV 142.3MiB 2025-01-11
10. IMG_7036.MOV 141.8MiB 2025-06-15
0x03
开源不易,如果感兴趣或者能帮助到你,欢迎点赞转发!
地址: https://github.com/chenhg5/imole
加入 telegram 群一起交流: https://t.me/+ZpgBu1dlmCszODBl