An intelligent iMessage assistant that analyzes incoming messages and provides summaries, importance ratings, and suggested replies using Google's Gemini AI.
- AI-Powered Analysis: Uses Gemini AI to analyze message priority and emotional tone
- Smart Filtering: Only processes messages above a minimum character length
- Auto-Summarization: Provides TL;DR summaries of long messages
- Reply Suggestions: Suggests natural, empathetic replies
- Smart Notifications: Only notifies you about high-priority messages
- macOS
- Node.js 18+
- A Gemini API key from Google AI Studio
- Clone the repository:
git clone https://github.com/Andy7301/textbutler.git
cd textbutler- Install dependencies:
npm install- Create a
.envfile in the root directory:
GEMINI_API_KEY=your_api_key_here- Configure your phone number in
src/config.ts:
export const MY_NUMBER = '+1234567890';Start the bot:
npm starttextbutler/
├── src/
│ ├── index.ts # Initializes SDK and starts watcher
│ ├── butler.ts # Message handling logic
│ ├── llm.ts # Gemini AI integration
│ ├── config.ts # Configuration constants
│ └── types.ts # TypeScript type definitions
├── .env # Environment variables (not in git)
├── package.json
└── tsconfig.json
- Message Detection: Watches for incoming messages
- Filtering: Only processes messages longer than
MIN_CHAR_LENGTHcharacters - AI Analysis: Sends message to Gemini AI for analysis
- Smart Notification: Only sends you a summary if the message is high priority
- Summary Format: Sends a formatted message with:
- Sender information
- Emotional vibe
- Priority rating
- TL;DR summary
- Suggested reply
Edit src/config.ts to customize:
MY_NUMBER: Your phone number (where summaries are sent)MIN_CHAR_LENGTH: Minimum message length to analyze