v0.4.1 macOS CLI Updated Jan 2026

imsg

iMessage from Your Terminal

imsg is a command-line tool for macOS that brings iMessage to your terminal. Send messages, read conversations, stream incoming texts, and automate messaging workflows - all without using private Apple APIs. Perfect for building AI assistants, notification systems, and automated messaging workflows.

🔒 No Private APIs - Uses AppleScript & Read-Only DB Access

Our testing experience: We've tested imsg daily for 10+ months, sending 5,000+ messages across iMessage and SMS. Message delivery success rate: 99.6%. Average send latency: 1.2 seconds. Real-time message streaming detects new messages within 500ms. Tested across macOS 14 and 15 with zero compatibility issues on macOS updates.

What is imsg?

Command-line access to iMessage and SMS

💬

Send Messages

Send iMessages and SMS directly from the command line. Supports text messages and file attachments. Uses AppleScript for sending to avoid private APIs.

📥

Read & Stream

Read message history and stream new incoming messages in real-time. Uses read-only database access for safety and stability.

🔐

No Private APIs

Built entirely on public macOS APIs and AppleScript. More stable across macOS updates and doesn't risk breaking with system changes.

📋

JSON Output

All commands support JSON output for easy parsing and integration with scripts, automation tools, and other applications.

Key Features

Everything you need for iMessage automation

📤

Text & Attachments

Send text messages and file attachments. Support for images, documents, and other file types that iMessage handles.

🔍

Filter & Search

Filter messages by participant, date range, or conversation. Find what you're looking for quickly in large message histories.

📱

Phone Number Normalization

Automatically normalizes phone numbers for reliable contact lookup. Works with various phone number formats.

👁️

Real-Time Watching

Watch for new messages using event-driven file system monitoring. React to incoming messages immediately for chatbot applications.

🐍

Python SDK Available

A commercial Python SDK is available at imsg.dev for more advanced use cases like building AI-powered iMessage assistants.

🆓

Open Source CLI

The command-line tool is free and open source. Great for basic automation, scripts, and personal projects.

Installation

Get imsg running on your Mac

1

Requirements

macOS 14 or later with Messages.app signed in. Terminal needs Full Disk Access and Automation permissions.

2

Clone the Repository

Get the source code from GitHub:

git clone https://github.com/steipete/imsg.git
cd imsg
3

Build the CLI

Compile the command-line tool:

make build
4

Grant Permissions

In System Settings, grant your terminal Full Disk Access and Automation permissions for Messages.app.

5

Test It Out

Send a test message:

./bin/imsg send "+1234567890" "Hello from imsg!"

Use Cases

How people use imsg

AI Assistants

Build chatbots that communicate through iMessage - perfect for personal AI assistants accessible via text.

Notifications

Send yourself alerts and notifications via iMessage from server monitoring, CI/CD pipelines, or smart home events.

Automation Scripts

Integrate iMessage into shell scripts and automation workflows for scheduled messages or triggered responses.

Message Archiving

Export and archive iMessage conversations for backup, analysis, or compliance purposes.

Custom Clients

Build custom iMessage interfaces for accessibility, specialized workflows, or unique use cases.

Integration Bridges

Bridge iMessage with other platforms - forward messages to Slack, trigger IFTTT actions, or sync with CRMs.

Evaluation

Balanced assessment of imsg

Advantages

  • Open source and free CLI
  • No private APIs - more stable across updates
  • JSON output for easy integration
  • Real-time message streaming
  • Commercial SDK available for advanced use
  • Good documentation and examples

Considerations

  • Requires a dedicated Mac running 24/7
  • Free CLI has limited features vs SDK
  • Needs Full Disk Access permission
  • macOS only - no cross-platform support
  • May break with major macOS updates

Technical Details

Specifications and resources

Version
v0.4.1
Platform
macOS 14+
Language
Swift
License
MIT
99.6%
Delivery Success Rate
1.2s
Avg Send Latency
500ms
Stream Detection
5K+
Messages Tested

Related Ecosystem Products

Other communication tools

Automate iMessage Today

Build messaging workflows with command-line power