Send and receive iMessages via the imsg CLI. List conversations, read message history, and send messages directly through Messages.app on macOS. Use when user says "send iMessage", "read my messages", "text someone", or "iMessage history".
Send and receive iMessages via the imsg CLI. macOS only — requires Messages.app with
an active Apple ID.
brew install steipete/tap/imsg
After install, grant Full Disk Access to Terminal (required to read the Messages database): System Settings → Privacy & Security → Full Disk Access → add Terminal (or iTerm2).
| Command | Description |
|---|---|
imsg list | List all conversations (contact + last message preview) |
imsg history "<contact>" | Show recent message history with a contact |
imsg history "<contact>" --limit 20 | Show last N messages |
imsg send "<contact>" "<message>" | Send an iMessage via Messages.app |
imsg send "+1XXXXXXXXXX" "<message>" | Send by phone number |
List all conversations:
imsg list
Read history with a contact:
imsg history "Alice"
imsg history "Alice" --limit 30
Send a message:
imsg send "Alice" "Hey, are we still on for lunch?"
imsg send "+18005550100" "Your order is ready."
which imsg