openclaw/imsg

CLI for Apple's Messages.app so your agent can send and receive text messages/iMessages.

What it solves

imsg provides a command-line interface to interact with your iMessage and SMS history on macOS. It bridges the gap between the Messages app and automated tools, allowing you to read, watch, and send messages directly from your terminal or through scripts.

How it works

The tool operates in two primary ways: it reads the local macOS Messages database (chat.db) in a read-only mode to fetch history and watch for new messages, and it uses AppleScript automation via the Messages app to send new messages. It supports outputting data in NDJSON or JSON-RPC formats, making it compatible with other software agents and automation pipelines.

Who it’s for

imsg is designed for power users, developers, and automation enthusiasts who want to integrate their messaging workflow with shell scripts, LLM agents, or custom monitoring tools on macOS.

Highlights

  • Read and search local message history using simple CLI commands.
  • Stream live updates for new messages, edits, unsends, and reactions.
  • Send text, files, and tapbacks directly from the terminal.
  • Export data as NDJSON or use JSON-RPC for programmatic integration.
  • Supports advanced features like chat creation and statistics tracking.
  • Compatible with standard shell tools like jq for data processing.

Related

  • Project
  • Project
  • Project
  • Project