Core capabilities of imsg
mainimsg is a macOS command-line tool designed for interacting with Messages.app. Its primary capabilities include:
- Local-first reads: Accesses chats, history, and attachments directly from
~/Library/Messages/chat.dbwithout network round-trips. - Live streams: Uses
imsg watchto follow filesystem events onchat.db(with a polling fallback) to stream new messages and tapbacks. - Messages.app automation: Sends text, attachments, and tapbacks via AppleScript automation.
- Agent-friendly: Provides stable JSON-RPC over stdio, deterministic JSON schemas, and
imsg completions llmfor LLM context. - Attachment handling: Reports filenames, UTIs, byte counts, and paths. Supports
--convert-attachmentsto provide model-friendly formats (e.g., CAF→M4A, GIF→PNG). - Linux support: Offers a read-only preview by inspecting a copied
chat.dbfrom macOS (cannot send or mutate).