openclaw/imsg
A CLI tool providing JSON-RPC access to Apple's Messages.app for AI agents and scripts.

imsg reads the macOS Messages SQLite database directly and drives Messages.app via AppleScript, exposing read, watch, and send operations through stable JSON and JSON-RPC interfaces. It streams new messages via filesystem events, resolves contacts, and handles attachments. A dedicated imsg completions llm command provides in-context CLI help for large language models, and the JSON-RPC surface over stdio is designed specifically for agent integrations and long-running workflows.