imsg

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

imsg Actions

imsg 操作指南

Overview

概述

Use
imsg
to read and send Messages.app iMessage/SMS on macOS.
Requirements: Messages.app signed in, Full Disk Access for your terminal, and Automation permission to control Messages.app for sending.
使用
imsg
在macOS上读取和发送Messages.app中的iMessage/SMS消息。
要求:已登录Messages.app,终端拥有全盘访问权限,并且具备控制Messages.app发送消息的自动化权限。

Inputs to collect

需要收集的输入信息

  • Recipient handle (phone/email) for
    send
  • chatId
    for history/watch (from
    imsg chats --limit 10 --json
    )
  • text
    and optional
    file
    path for sends
  • 执行
    send
    操作时需要收件人标识(电话/邮箱)
  • 执行history/watch操作时需要
    chatId
    (可通过
    imsg chats --limit 10 --json
    获取)
  • 发送消息时需要
    text
    文本内容,可选附带
    file
    文件路径

Actions

操作命令

List chats

列出聊天列表

bash
imsg chats --limit 10 --json
bash
imsg chats --limit 10 --json

Fetch chat history

获取聊天历史

bash
imsg history --chat-id 1 --limit 20 --attachments --json
bash
imsg history --chat-id 1 --limit 20 --attachments --json

Watch a chat

监控聊天

bash
imsg watch --chat-id 1 --attachments
bash
imsg watch --chat-id 1 --attachments

Send a message

发送消息

bash
imsg send --to "+14155551212" --text "hi" --file /path/pic.jpg
bash
imsg send --to "+14155551212" --text "hi" --file /path/pic.jpg

Notes

注意事项

  • --service imessage|sms|auto
    controls delivery.
  • Confirm recipient + message before sending.
  • --service imessage|sms|auto
    参数用于控制消息发送渠道。
  • 发送前请确认收件人和消息内容。

Ideas to try

可尝试的用法

  • Use
    imsg chats --limit 10 --json
    to discover chat ids.
  • Watch a high-signal chat to stream incoming messages.
  • 使用
    imsg chats --limit 10 --json
    命令发现聊天ID。
  • 监控高优先级聊天,实时接收新消息。