Skip to content

feat: add iMessage platform adapter via imsg CLI#4907

Closed
zoskebutler wants to merge 1 commit into
NousResearch:mainfrom
Bridgerz:feat/imessage-platform
Closed

feat: add iMessage platform adapter via imsg CLI#4907
zoskebutler wants to merge 1 commit into
NousResearch:mainfrom
Bridgerz:feat/imessage-platform

Conversation

@zoskebutler

Copy link
Copy Markdown

Summary

  • Adds iMessage as a messaging platform using the imsg CLI for sending and receiving messages through the local Messages.app
  • Real-time message streaming via imsg watch --json, text/attachment sending, typing indicators, chat discovery
  • Automatic reconnection with exponential backoff when the watch process exits
  • Full integration: platform enum, env var config, adapter factory, auth maps, cron delivery, send_message_tool routing, channel directory, prompt hints, toolset config

Setup

  1. brew install steipete/tap/imsg
  2. Grant Full Disk Access to your terminal (or Python binary if using launchd)
  3. Add to ~/.hermes/.env:
    IMESSAGE_ENABLED=true
    IMESSAGE_ALLOW_ALL_USERS=true
    
  4. hermes gateway restart

Requires macOS 14+ with Messages.app signed into iCloud. No API keys or third-party accounts needed.

Environment Variables

Variable Required Description
IMESSAGE_ENABLED Yes Set to true to enable
IMESSAGE_ALLOW_ALL_USERS No Set to true for open access
IMESSAGE_ALLOWED_USERS No Comma-separated phone numbers/emails
IMESSAGE_HOME_CHANNEL No Chat ID for cron job delivery
IMESSAGE_IMSG_PATH No Custom path to imsg binary (default: imsg)

Test plan

  • Adapter imports cleanly from Hermes venv
  • Gateway starts with iMessage platform connected
  • imsg watch process stays alive and streams incoming messages
  • Incoming messages routed to agent and responded to
  • Tested locally for multiple days

🤖 Generated with Claude Code

Add iMessage as a messaging platform using the `imsg` CLI
(https://github.com/steipete/imsg) for sending and receiving messages
through the local Messages.app database and AppleScript.

Features:
- Real-time message streaming via `imsg watch --json`
- Text and attachment sending via `imsg send`
- Native typing indicators via `imsg typing`
- Chat discovery via `imsg chats`
- Automatic reconnection with exponential backoff
- User allowlisting via IMESSAGE_ALLOWED_USERS

Setup: install imsg (`brew install steipete/tap/imsg`), grant Full Disk
Access, set IMESSAGE_ENABLED=true in ~/.hermes/.env.

Requires macOS 14+ with Messages.app signed into iCloud.
@teknium1

teknium1 commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Closing in favor of #6437 which landed BlueBubbles as the first iMessage backend. The imsg CLI approach is a valid alternative for macOS-only setups — if there's interest in a second iMessage backend, we'd consider it as a follow-up. Thank you @zoskebutler!

@teknium1 teknium1 closed this Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants