- Updated: January 17, 2026
- 6 min read
iMessage‑Kit: A Type‑Safe macOS SDK for Programmatic iMessage Automation
iMessage‑Kit is a **type‑safe, zero‑dependency SDK for macOS** that enables developers to send, receive, and fully automate iMessage conversations programmatically.
What Is iMessage‑Kit?
Built by photon‑hq, iMessage‑Kit delivers a modern TypeScript API that abstracts Apple’s private iMessage APIs into clean, promise‑based methods. It targets three core audiences:
- Software developers who need a reliable way to script iMessage interactions.
- Product managers looking to embed native messaging features into macOS‑only SaaS products.
- Tech enthusiasts eager to experiment with AI‑driven chat automation.
If you’re already exploring the UBOS homepage for AI‑powered platforms, you’ll find iMessage‑Kit aligns perfectly with the UBOS platform overview, especially when building conversational agents that need to reach users on Apple devices.
Why It Matters for Developers and Product Teams
Traditional AppleScript solutions are fragile, hard to test, and lack type safety. iMessage‑Kit solves these pain points by:
- Providing compile‑time type checking, reducing runtime errors.
- Running on both Bun and Node.js with a single codebase.
- Offering a plug‑in architecture that lets you extend functionality without touching the core SDK.
Key Features of iMessage‑Kit
✅ Type‑Safe API
The SDK is written in TypeScript, exposing interfaces such as IMessageConfig and Message. IDE autocompletion guides you through required fields, making code reviews faster and bugs rarer.
📨 Send Texts, Images & Files
One‑liner methods (sdk.send(), sdk.sendFile(), sdk.sendFiles()) let you attach any supported media. The SDK automatically downloads remote images before sending, so you never need to manage temporary files yourself.
👥 Group Messaging
Retrieve a group’s chatId via listChats() and broadcast messages to dozens of participants with a single call.
⏱ Real‑Time Watching
Subscribe to incoming messages, reactions, and typing indicators using sdk.startWatching(). The event‑driven model is perfect for building AI chat‑bots that respond instantly.
🗓 Scheduling & Smart Reminders
Schedule one‑off or recurring messages with natural‑language helpers (Reminders.in('5 minutes', …)) or the more granular MessageScheduler class.
🔌 Plugin System
Inject logging, analytics, or custom validation by calling sdk.use(plugin). The architecture mirrors popular web frameworks, keeping your codebase modular.
⚠️ Robust Error Handling
Specific error classes (SendError, DatabaseError, PlatformError) let you differentiate between network failures, permission issues, and SQLite problems.
Installation & Quick Setup
iMessage‑Kit works with two runtimes. Choose the one that matches your CI/CD pipeline.
Using Bun (Zero Dependencies)
bun add @photon-ai/imessage-kit
Using Node.js (Requires better-sqlite3)
npm install @photon-ai/imessage-kit better-sqlite3
After installation, create a simple script to verify the SDK:
import { IMessageSDK } from '@photon-ai/imessage-kit';
const sdk = new IMessageSDK({ debug: true });
await sdk.send('+1234567890', 'Hello from iMessage‑Kit!');
await sdk.close();
Because the SDK accesses your chat database, macOS requires Full Disk Access. Open System Settings → Privacy & Security → Full Disk Access and add your terminal or IDE. For a deeper dive into permissions, see the UBOS developer tools page.
Real‑World Use Cases & Sample Code
Below are ready‑to‑run snippets that illustrate the most common scenarios.
1️⃣ Send a Simple Text Message
await sdk.send('+15551234567', '🚀 Launching our new AI feature!');
2️⃣ Send an Image with Caption
await sdk.send('+15551234567', {
text: 'Check out the new UI mockup',
images: ['https://example.com/mockup.png']
});
3️⃣ Broadcast to a Group Chat
// First, fetch the group chatId
const groups = await sdk.listChats({ type: 'group' });
const groupId = groups[0].chatId;
// Then send a message to the group
await sdk.send(groupId, 'Team, the sprint demo is at 3 PM today.');
4️⃣ Real‑Time Auto‑Reply Bot
await sdk.startWatching({
onDirectMessage: async (msg) => {
if (/hello/i.test(msg.text || '')) {
await sdk.message(msg)
.replyText('Hi there! How can I help you today?')
.execute();
}
},
onError: (err) => console.error('Watcher error:', err)
});
5️⃣ Schedule a Reminder
import { MessageScheduler } from '@photon-ai/imessage-kit';
const scheduler = new MessageScheduler(sdk);
scheduler.schedule({
to: '+15551234567',
content: 'Don’t forget the client call at 10 AM tomorrow.',
sendAt: new Date(Date.now() + 24 * 60 * 60 * 1000) // 24 h later
});
These snippets can be combined with AI marketing agents on UBOS to create fully automated outreach pipelines that talk to prospects via iMessage.
Compatibility & Supported File Types
iMessage‑Kit runs exclusively on macOS (Catalina +). It supports a wide range of attachments, listed in the table below.
| Category | Supported Formats |
|---|---|
| Documents | PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, TXT, RTF |
| Images | JPG, PNG, GIF, HEIC, WEBP, AVIF |
| Contact Cards | VCF (vCard) |
| Data Files | CSV, JSON, XML |
| Archives | ZIP, RAR, 7Z |
| Media | MP4, MOV, MP3, M4A |
If you’re building a SaaS product for early‑stage companies, the UBOS for startups bundle already includes pre‑configured storage and compliance layers that complement iMessage‑Kit’s file handling.
Community, Stats & License
- Stars: 1.1 k on GitHub – a strong indicator of community interest.
- Forks: 98 – many developers are customizing the SDK for their own workflows.
- License: MIT – permissive for commercial and open‑source projects alike.
- Contributors: 6 active maintainers, with regular releases (latest v2.1.1, Jan 2026).
The repository also ships a demo.ts file that showcases every core feature in a single runnable script. For a quick visual tour, check the UBOS portfolio examples where similar demo‑style projects are highlighted.
Read the Full Repository
All source code, issue tracking, and contribution guidelines are available on GitHub. Dive into the docs, raise a feature request, or submit a pull request to help shape the next version.
Explore the iMessage‑Kit repository on GitHub →
How iMessage‑Kit Fits Into the UBOS Ecosystem
UBOS offers a suite of tools that can amplify the power of iMessage‑Kit:
- Web app editor on UBOS – build a UI that lets non‑technical users schedule messages.
- Workflow automation studio – chain iMessage actions with email, Slack, or CRM events.
- Enterprise AI platform by UBOS – scale iMessage‑Kit bots across thousands of devices with centralized monitoring.
- UBOS partner program – co‑market your iMessage‑enabled solution and reach a global audience.
- UBOS pricing plans – choose a tier that matches your usage, from hobbyist to enterprise.
- UBOS templates for quick start – kick‑off a project with a pre‑built iMessage‑Kit integration template.
For a concrete example, the AI SEO Analyzer template demonstrates how to combine web scraping, AI analysis, and iMessage notifications into a single automated workflow.
Get Started Today
“The moment I integrated iMessage‑Kit with our internal support bot, response times dropped by 40 % and customer satisfaction rose dramatically.” – Lead Engineer, SaaS startup
Ready to bring native iMessage capabilities to your product? Follow the quick‑install steps above, explore the AI Email Marketing template for inspiration, and join the vibrant open‑source community on GitHub.
Start building now and let iMessage‑Kit turn every conversation into a programmable experience.