# iMessage bot on Cloudflare Workers with Hono

Put your product in iMessage with Keiki from a Hono app on Cloudflare Workers, in about 100 lines of code.

[View imessage-hono-workers-starter on GitHub](https://github.com/Mail-0/imessage-hono-workers-starter)

## How do I run an iMessage bot on Cloudflare Workers?

1. Clone [github.com/Mail-0/imessage-hono-workers-starter](https://github.com/Mail-0/imessage-hono-workers-starter) and deploy it with the Deploy to Cloudflare button or `npm install && npx wrangler deploy`.
2. Run `npx @onkeiki/cli init --dispatch-url https://your-app.example.com/keiki/turn --skip-install` with your Worker URL, then `npx wrangler secret put KEIKI_SIGNING_SECRET` and `npx wrangler secret put OPENAI_API_KEY`.
3. [Attach an iMessage line](https://onkeiki.com/docs/channels#imessage-lines) to the agent and text it.

Your code, your model, your servers. Keiki only handles the channels.

## Details

- Stack: Hono, Cloudflare Workers, Vercel AI SDK, TypeScript
- Channels: iMessage
- Docs: [/docs/external-harness](https://onkeiki.com/docs/external-harness)
- Guide: [How do I run an iMessage bot on Cloudflare Workers?](https://onkeiki.com/content/how-do-i-run-an-imessage-bot-on-cloudflare-workers)
