跳转到内容

iMessage Setup

此内容尚不支持你的语言。

Connect Clawdbot to iMessage for a native macOS AI assistant experience. Chat with Claude directly through your Mac’s Messages app.

  • macOS 10.15 (Catalina) or later
  • Clawdbot installed
  • iCloud account with iMessage enabled
  • Terminal accessibility permissions
  1. Grant Permissions

    System Preferences → Security & Privacy → Privacy:

    • Full Disk Access: Add Terminal (or your IDE)
    • Accessibility: Add Terminal
  2. Enable iMessage channel

    Terminal window
    IMESSAGE_ENABLED=true
  3. Configure automation

    Clawdbot reads from the Messages database at: ~/Library/Messages/chat.db

  4. Start Clawdbot

    Terminal window
    python -m clawdbot
  5. Test

    Send yourself an iMessage (or have a contact message you)

.env
IMESSAGE_ENABLED=true
# Allowed contacts (phone/email, empty = all)
IMESSAGE_ALLOWED_CONTACTS=+1234567890,email@example.com
# Response delay (seconds)
IMESSAGE_RESPONSE_DELAY=1
# Poll interval for new messages (seconds)
IMESSAGE_POLL_INTERVAL=2
  1. Clawdbot monitors the Messages SQLite database
  2. New messages trigger Claude API calls
  3. Responses sent via AppleScript automation
  • macOS only: No Windows/Linux support
  • Single account: Your iCloud account only
  • No group chats: Individual conversations only
  • Rate limits: AppleScript automation has delays

“Permission denied” errors

  • Ensure Full Disk Access is granted
  • Restart Terminal after granting permissions

Messages not detected

  • Check database path exists
  • Verify poll interval timing

Responses not sending

  • Grant Accessibility permissions
  • Test AppleScript manually