返回顶部
i

imsgctlimsgctl 数据读取

Read Apple Messages data with imsgctl: check access, list chats, inspect message history, filter by time, include attachment metadata, and watch new activity from the local data available to imsgctl.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
111
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

imsgctl

imsgctl

使用 imsgctl 读取当前机器上可用的 Apple 信息数据。

使用场景

  • - 用户想要查看 Apple 信息中的 iMessage 或短信数据。
  • 用户想要列出最近的聊天记录。
  • 用户想要查看特定聊天的消息历史。
  • 用户想要按时间筛选消息历史。
  • 用户想要获取附件元数据。
  • 用户想要监控新消息或反应。

禁止使用场景

  • - 用户想要发送或回复消息。
  • 用户想要删除、编辑、回复或以其他方式修改信息数据。
  • 请求涉及 Slack、Discord、Telegram、Signal、WhatsApp 或其他消息系统。

操作规则

  • - 当结果可能需要解析或复用时,优先使用 --json。
  • imsgctl health --json 输出单个 JSON 对象。
  • imsgctl chats --json、history --json 和 watch --json 输出 JSONL 格式。
  • 当用户指定了特定的数据库路径,或后端需要明确指定时,使用 --db PATH。
  • 仅用于实时监控时使用 watch。它会持续输出直到被中断。

默认值与访问权限

  • - 在 macOS 上,不指定 --db 运行时,如果存在有效的副本,则优先使用 ~/Library/Application Support/imsgkit/replica.db。否则回退到 ~/Library/Messages/chat.db。
  • 在 Linux 上,不指定 --db 运行时,读取 ~/.local/share/imsgkit/replica.db,或当 XDGDATAHOME 设置为绝对路径时读取 $XDGDATAHOME/imsgkit/replica.db。
  • 直接访问 ~/Library/Messages/chat.db 需要 macOS 系统,并且执行读取的进程需要拥有完全磁盘访问权限。
  • 如果无法解析联系人,聊天和发送者标签可能会回退到原始标识符。

常用命令

检查访问权限

bash
imsgctl health --json

列出最近聊天

bash
imsgctl chats --limit 20 --json

读取聊天的最近历史

bash
imsgctl history --chat-id 42 --limit 50 --json

读取包含附件元数据的历史

bash
imsgctl history --chat-id 42 --limit 50 --attachments --json

读取指定时间范围内的历史

bash
imsgctl history \
--chat-id 42 \
--limit 50 \
--start 2026-03-01T00:00:00Z \
--end 2026-03-02T00:00:00Z \
--json

监控新活动

bash
imsgctl watch --chat-id 42 --json

监控新消息、附件和反应

bash
imsgctl watch --chat-id 42 --attachments --reactions --json

使用显式数据库路径

bash
imsgctl chats --db ~/Library/Application\ Support/imsgkit/replica.db --limit 20 --json
imsgctl history --db ~/.local/share/imsgkit/replica.db --chat-id 42 --limit 50 --json

推荐工作流程

  1. 1. 运行 imsgctl health --json 确认访问权限。
  2. 运行 imsgctl chats --limit 20 --json 确定目标聊天。
  3. 使用返回的聊天 ID 配合 imsgctl history --chat-id ... --json。
  4. 仅在需要时添加 --start、--end、--limit 或 --attachments。
  5. 仅当用户要求实时监控时使用 imsgctl watch。

查看图片附件

当 --attachments 显示有图片时,文件通常太大无法直接读取。将其转换为较小的 JPEG 预览图,然后读取结果:

  • - macOS: sips -s format jpeg -Z 800 /path/to/image.heic --out /tmp/preview.jpg
  • Linux: magick /path/to/image.heic -resize 800x800 /tmp/preview.jpg

失败模式

  • - 如果 macOS 直接读取失败,首先检查完全磁盘访问权限。
  • 如果预期的本地数据库路径不存在,访问将失败,直到当前机器上存在正确的数据库。
  • 如果聊天标签不明确或缺失,请依赖聊天 ID 和原始标识符。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 imsgctl-1775944204 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 imsgctl-1775944204 技能

通过命令行安装

skillhub install imsgctl-1775944204

下载

⬇ 下载 imsgctl v1.0.0(免费)

文件大小: 2.41 KB | 发布时间: 2026-4-12 10:16

v1.0.0 最新 2026-4-12 10:16
Read your Apple Messages from any machine.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部