# Project export: Bluely

This document was generated by HackStack to give an AI agent context about a hackathon project. Sections are labeled with their provenance; content marked as truncated was cut to keep this document small.

## Project metadata

- Hackathon: UC Berkeley AI Hackathon 2025
- Tagline: Bluely: the plug‑and‑play Python SDK to build AI-native iMessage bots—no Apple approval or complex infrastructure required. Anyone can deploy AI assistants with world-class CX and retention instantly.
- Devpost: https://devpost.com/software/bluely
- GitHub: https://github.com/shrey150/imessage-bots
- Video: https://www.youtube.com/embed/E6ELwzEKd2U?enablejsapi=1&hl=en_US&rel=0&start=&version=3&wmode=transparent
- Team: 3 GitHub contributor(s) — Mihir Arya (9 commits), Rish-J (5 commits), Shrey Pandya (2 commits)

## Devpost submission (written by the team)

### Inspiration

We kept seeing people build iMessage bots—Jarvis-style assistants, AI agents, feedback collectors—but every setup was custom, messy, and not reusable. So we built Bluely: a plug-and-play iMessage bot framework focused on real-world utility, with AI-first integrations baked in.

### What it does

Bluely is a Python SDK and framework that makes it dead simple to build iMessage bots. It abstracts away BlueBubbles' iMessage plumbing and gives devs a clean interface—like building Slack or Discord bots, but for iMessage. Our flagship bot helps early-stage founders automatically collect user feedback over iMessage, summarize it using AI, and triage it into actionable Linear issues.

### How we built it

We used the BlueBubbles API to tap into iMessage, and built a Pythonic SDK on top with routing, message handling, and response templates. Then we integrated OpenAI for summarization and Linear’s API for issue creation. We built five bots using Bluely, including a therapy bot, a scheduling assistant, and a fact-checking agent—but our founder feedback bot is the one we’re most excited about.

### Challenges we ran into

Apple doesn’t expose iMessage APIs, so getting stable and real-time access requires reverse engineering via BlueBubbles. Making the SDK general enough to support different bot types—but still easy to use—was a tricky balance. Integrating AI without losing control over hallucinations also required tuning.

### Accomplishments we're proud of

Our flagship founder bot works. It receives iMessage feedback from users, uses GPT to summarize and categorize it, and files it directly to Linear with context. In less than 24 hours, we built multiple bots using Bluely—each one showcasing a different vertical—but this one made real product feedback effortless.

### What we learned

iMessage is wildly underutilized in product workflows. The response rates are better, the UX is friendlier, and it’s where users already are. Founders shouldn’t have to forward texts, open Notion, or guess what users want—our bot handles all that with AI.

### What's next

We’re open-sourcing Bluely with docs and templates for rapid bot building. We’ll expand integrations—Notion, Slack, Calendly, Supabase—and focus on AI-first bots that solve real pain points. The founder feedback bot is just the beginning. We want to power every conversational use case on the most engaging messaging platform in the world. Demo Link Pitch Live Demo

## README (from the GitHub repository)

# 🤖 iMessage Bot Framework

A simple, flexible framework for building iMessage bots using BlueBubbles. Create powerful bots with just a few lines of Python!

## ✨ Features

- **Simple API**: Create bots with minimal code
- **Flexible Patterns**: Commands, regex, text matching, and more
- **State Management**: Built-in persistent storage
- **Middleware Support**: Add authentication, rate limiting, logging
- **Production Ready**: Built on FastAPI with proper error handling
- **Extensible**: Plugin system for advanced features

## 🚀 Quick Start

### Installation

Install using pip:
```bash
pip install imessage-bot-framework
```

Or with Poetry:
```bash
poetry add imessage-bot-framework
```

### Your First Bot

```python
from imessage_bot_framework import Bot

# Create a bot
bot = Bot("My First Bot")

# Add a simple command
@bot.on_message
def hello_handler(message):
    if message.text.startswith("!hello"):
        return "Hello there! 👋"

# Start the bot
bot.run()
```

Set your environment variables:
```bash
export BLUEBUBBLES_SERVER_URL="http://localhost:1234"
export BLUEBUBBLES_PASSWORD="your_password"
```

Run your bot and send `!hello` in any iMessage chat!

## 📚 Examples

### Command Bot with Arguments

```python
from imessage_bot_framework import Bot
from imessage_bot_framework.decorators import command

bot = Bot("Calculator Bot")

@bot.on_message
@command("!calc")
def calculator(message, args):
    try:
        result = eval(args)  # Don't do this in production!
        return f"Result: {result}"
    except:
        return "Invalid calculation"

bot.run()
```

### State Management

```python
from imessage_bot_framework import Bot, State
from imessage_bot_framework.decorators import command

bot = Bot("Counter Bot")
state = State()

@bot.on_message
@command("!count")
def increment_counter(message):
    count = state.increment(f"counter_{message.sender}")
    return f"Your count: {count}"

@bot.on_message
@command("!reset")
def reset_counter(message):
    state.set(f"counter_{message.sender}", 0)
    return "Counter reset!"

bot.run()
```

### Regex Patterns

```python
from imessage_bot_framework import Bot
from imessage_bot_framework.decorators import regex

bot = Bot("Math Bot")

@bot.on_message
@regex(r"(\d+)\s*([+\-*/])\s*(\d+)")
def math_handler(message, a, op, b):
    a, b = int(a), int(b)
    if op == '+': return f"{a} + {b} = {a + b}"
    if op == '-': return f"{a} - {b} = {a - b}"
    if op == '*': return f"{a} * {b} = {a * b}"
    if op == '/': return f"{a} / {b} = {a / b}" if b != 0 else "Cannot divide by zero!"

bot.run()
```

### Middleware Example

```python
from imessage_bot_framework import Bot
from imessage_bot_framework.decorators import command, rate_limit

bot = Bot("Protected Bot")

# Rate limiting middleware
@bot.use_middleware
def rate_limiter(message, next_handler):
    # Simple rate limiting logic here
    return next_handler(message)

# Authentication middleware
@bot.use_middleware
def auth_required(message, next_handler):
    if message.sender not in ["allowed_user@example.com"]:
        return "Access denied"
    return next_handler(message)

@bot.on_message
@command("!secret")
def secret_command(message):
    return "You have access to the secret!"

bot.run()
```

### Chat Interaction

```python
from imessage_bot_framework import Bot

bot = Bot("Chat Manager")

@bot.on_message
def chat_info(message):
    if message.text == "!info":
        participants = message.chat.get_participants()
        recent_messages = message.chat.get_messages(limit=10)
        return f"Chat has {len(participants)} participants and {len(recent_messages)} recent messages"

@bot.on_message
def broadcast(message):
    if message.text.startswith("!broadcast ") and message.is_from_me:
        msg = message.text[11:]  # Remove "!broadcast "
        # Send to multiple chats
        bot.send_to_chat(msg, "chat-guid-1")
        bot.send_to_chat(msg, "chat-guid-2")
        return "Message broadcasted!"

bot.run()
```

## 🎯 Available Decorators

### Pattern Matching
- `@command("!trigger")` - Match command triggers
- `@contains("text")` - Match messages containing text
- `@regex(r"pattern")` - Match regex patterns

### Access Control
- `@only_from_me()` - Only respond to your messages
- `@only_from_user("user@example.com")` - Restrict to specific user
- `@rate_limit(max_calls=5, window_seconds=60)` - Rate limiting

## 🗄️ State Management

The framework includes a simple but powerful state system:

```python
from imessage_bot_framework import State

state = State("my_bot_state.json")

# Basic operations
state.set("key", "value")
value = state.get("key", "default")
state.delete("key")

# Numeric operations
count = state.increment("counter")
state.increment("score", 10)

# List operations
state.append("items", "new_item")

# Conversation context
with state.conversation(user_id) as conv:
    conv.set("name", "John")
    conv.save({"age": 25, "city": "NYC"})
```

## 🛠️ CLI Tool

The framework includes a CLI tool to help you create new bots quickly:

### Create a New Bot

```bash
# Install the framework
pip install imessage-bot-framework

# Create a new bot project
imessage-bot create "My Awesome Bot"

# Or specify a directory
imessage-bot create "My Bot" --directory ~/bots/
```

This creates a complete bot project with:
- `main.py` - Your bot's main file
- `config.py` - Configuration management
- `pyproject.toml` - Poetry dependencies
- `.env.example` - Environment template
- `README.md` - Project documentation

### CLI Commands

```bash
imessage-bot create <name>     # Create a new bot
imessage-bot version           # Show framework version
```

### Using the Generated Project

```bash
cd my-awesome-bot
poetry install
cp .env.example .env
# Edit .env with your BlueBubbles configuration
poetry run python main.py
```

## 🔧 Configuration

Set these environment variables:

```bash
# Required
BLUEBUBBLES_SERVER_URL=http://localhost:1234
BLUEBUBBLES_PASSWORD=your_password

# Optional
BOT_DEBUG=true
BOT_PORT=8000
```

Or configure programmatically:

```python
bot = Bot("My Bot", port=8001, debug=True)
```

## 🏗️ Project Structure

```
my_bot/
├── main.py            # Main bot file
├── config.py          # Configuration management
├── pyproject.toml     # Poetry dependencies
├── .env               # Environment variables
├── .env.example       # Environment template
├── README.md          # Project documentation
└── bot_state.json     # Persistent state (auto-created)
```

## 📡 Deployment

### Local Development
```bash
# With Poetry
poetry run python main.py

# Or with pip
python main.py
```

### Production with Docker
```dockerfile
FROM python:3.11-slim

# Install Poetry
RUN pip install poetry

WORKDIR /app

# Copy Poetry files
COPY pyproject.toml poetry.lock* ./

# Configure Poetry and install dependencies
RUN poetry config virtualenvs.create false \
    && poetry install --no-dev

COPY . .
CMD ["python", "main.py"]
```

### Environment Variables for Production
```bash
BLUEBUBBLES_SERVER_URL=https://your-bluebubbles-server.com
BLUEBUBBLES_PASSWORD=your_secure_password
```

## 🔌 Extending with Plugins

Create custom plugins:

```python
# plugins/openai_plugin.py
import openai

class OpenAIPlugin:
    def __init__(self, api_key):
        self.client = openai.OpenAI(api_key=api_key)
    
    def chat_completion(self, prompt):
        response = self.client.chat.completions.create(
            model="gpt-4",
            messages=[{"role": "user", "content": prompt}]
        )
        return response.choices[0].message.content

# Use in your bot
from plugins.openai_plugin import OpenAIPlugin

bot = Bot("AI Bot")
ai = OpenAIPlugin(api_key="your-key")

@bot.on_message
@command("!ai")
def ai_chat(message, prompt):
    response = ai.chat_completion(prompt)
    return response

bot.run()

# Add to pyproject.toml:
# [tool.poetry.dependencies]
# openai = "^1.0.0"
```

## 🐛 Debugging

Enable debug mode:

```python
bot = Bot("Debug Bot", debug=True)
```

Or set 

[README truncated for size]

## Detected evidence (automated analysis)

Indexed codebase: 80 recognized source files, 554 KB.
- FastAPI (technology) — detected in the code
- OpenAI (technology) — detected in the code
- Python (language) — detected in the code

## Codebase structure (from repository index)

### Files (96 of 96)

```
.gitignore
CONTRIBUTING.md
docs/.gitbook.yaml
docs/advanced/custom-endpoints.md
docs/api-reference/bot-class.md
docs/best-practices/deployment.md
docs/cli/overview.md
docs/examples/echo-bot.md
docs/getting-started/installation.md
docs/getting-started/quick-start.md
docs/README.md
docs/SUMMARY.md
examples/command_bot.py
examples/regex_bot.py
imessage_bot_framework/__init__.py
imessage_bot_framework/cli/__init__.py
imessage_bot_framework/cli/main.py
imessage_bot_framework/core/__init__.py
imessage_bot_framework/core/bot.py
imessage_bot_framework/core/chat.py
imessage_bot_framework/core/message.py
imessage_bot_framework/decorators/__init__.py
imessage_bot_framework/decorators/patterns.py
imessage_bot_framework/state/__init__.py
imessage_bot_framework/state/state.py
imessage-bots/.gitignore
imessage-bots/docs/BlueBubbles.postman_collection.json
imessage-bots/src/bots/feedback-bot/config.py
imessage-bots/src/bots/feedback-bot/conversation_state.py
imessage-bots/src/bots/feedback-bot/env.example
imessage-bots/src/bots/feedback-bot/feedback_ai.py
imessage-bots/src/bots/feedback-bot/linear_integration.py
imessage-bots/src/bots/feedback-bot/main.py
imessage-bots/src/bots/feedback-bot/models.py
imessage-bots/src/bots/feedback-bot/pyproject.toml
imessage-bots/src/bots/feedback-bot/README.md
imessage-bots/src/bots/feedback-bot/test_linear.py
imessage-bots/src/bots/gork-bot/config.py
imessage-bots/src/bots/gork-bot/conversation_state.py
imessage-bots/src/bots/gork-bot/gork_ai.py
imessage-bots/src/bots/gork-bot/main.py
imessage-bots/src/bots/gork-bot/models.py
imessage-bots/src/bots/gork-bot/pyproject.toml
imessage-bots/src/bots/gork-bot/README.md
imessage-bots/src/bots/lover-bot-sdk/COMPARISON.md
imessage-bots/src/bots/lover-bot-sdk/config.py
imessage-bots/src/bots/lover-bot-sdk/conversation_state.py
imessage-bots/src/bots/lover-bot-sdk/lover_ai.py
imessage-bots/src/bots/lover-bot-sdk/main.py
imessage-bots/src/bots/lover-bot-sdk/models.py
imessage-bots/src/bots/lover-bot-sdk/pyproject.toml
imessage-bots/src/bots/lover-bot-sdk/README.md
imessage-bots/src/bots/lover-bot/config.py
imessage-bots/src/bots/lover-bot/conversation_state.py
imessage-bots/src/bots/lover-bot/lover_ai.py
imessage-bots/src/bots/lover-bot/main.py
imessage-bots/src/bots/lover-bot/models.py
imessage-bots/src/bots/lover-bot/pyproject.toml
imessage-bots/src/bots/lover-bot/README.md
imessage-bots/src/bots/meeting-scheduler/config.py
imessage-bots/src/bots/meeting-scheduler/conversation_state.py
imessage-bots/src/bots/meeting-scheduler/google_calendar.py
imessage-bots/src/bots/meeting-scheduler/main.py
imessage-bots/src/bots/meeting-scheduler/meeting_parser.py
imessage-bots/src/bots/meeting-scheduler/models.py
imessage-bots/src/bots/meeting-scheduler/pyproject.toml
imessage-bots/src/bots/meeting-scheduler/README.md
imessage-bots/src/bots/meeting-scheduler/requirements.txt
imessage-bots/src/bots/meeting-scheduler/setup.py
imessage-bots/src/bots/meeting-scheduler/test_parser.py
imessage-bots/src/bots/recap-bot/config.py
imessage-bots/src/bots/recap-bot/main.py
imessage-bots/src/bots/recap-bot/message_summarizer.py
imessage-bots/src/bots/recap-bot/message_tracker.py
imessage-bots/src/bots/recap-bot/models.py
imessage-bots/src/bots/recap-bot/pyproject.toml
imessage-bots/src/bots/recap-bot/README.md
imessage-bots/src/bots/recap-bot/requirements.txt
imessage-bots/src/bots/recap-bot/setup.py
imessage-bots/src/bots/recap-bot/test_bot.py
imessage-bots/src/bots/resume-roast/config.py
imessage-bots/src/bots/resume-roast/conversation_state.py
imessage-bots/src/bots/resume-roast/linkedin_scraper.py
imessage-bots/src/bots/resume-roast/main.py
imessage-bots/src/bots/resume-roast/models.py
imessage-bots/src/bots/resume-roast/pyproject.toml
imessage-bots/src/bots/resume-roast/README.md
imessage-bots/src/bots/resume-roast/requirements.txt
imessage-bots/src/bots/resume-roast/roast_generator.py
imessage-bots/src/bots/resume-roast/stagehand_scraper.py
imessage-bots/src/bots/resume-roast/STAGEHAND_SETUP.md
imessage-bots/src/bots/resume-roast/test_stagehand.py
LICENSE
pyproject.toml
README.md
test_sdk.py
```

### Dependencies

- imessage-bots/src/bots/feedback-bot/pyproject.toml: black@^23.10.1, fastapi@^0.104.1, flake8@^6.1.0, mypy@^1.7.0, openai@^1.3.0, pydantic@^2.5.0, pytest@^7.4.3, pytest-asyncio@^0.21.1, python-dotenv@^1.0.0, requests@^2.31.0, uvicorn@^0.24.0
- imessage-bots/src/bots/gork-bot/pyproject.toml: fastapi@>=0.115.13,<0.116.0, openai@>=1.0.0, pydantic@>=2.0.0, python-dotenv@>=1.0.0, python-multipart@>=0.0.6, requests@>=2.31.0, uvicorn@>=0.24.0
- imessage-bots/src/bots/lover-bot-sdk/pyproject.toml: black@^23.0.0, imessage-bot-framework, openai@^1.0.0, pytest@^7.0.0, python-dotenv@^1.0.0
- imessage-bots/src/bots/lover-bot/pyproject.toml: black@^23.0.0, fastapi@^0.100.0, flake8@^6.0.0, imessage-bot-framework, openai@^1.0.0, pydantic@^2.0.0, pytest@^7.0.0, python-dotenv@^1.0.0, requests@^2.28.0, uvicorn@^0.20.0
- imessage-bots/src/bots/meeting-scheduler/pyproject.toml: fastapi@>=0.115.13,<0.116.0, google-api-python-client@>=2.0.0, google-auth-httplib2@>=0.2.0, google-auth-oauthlib@>=1.0.0, openai@>=1.0.0, pydantic@>=2.0.0, python-dateutil@>=2.8.0, python-dotenv@>=1.0.0, python-multipart@>=0.0.6, requests@>=2.31.0, uvicorn@>=0.24.0
- imessage-bots/src/bots/meeting-scheduler/requirements.txt: fastapi[standard]@>=0.115.13,<0.116.0, google-api-python-client@>=2.0.0, google-auth-httplib2@>=0.2.0, google-auth-oauthlib@>=1.0.0, openai@>=1.0.0, pydantic@>=2.0.0, python-dateutil@>=2.8.0, python-dotenv@>=1.0.0, python-multipart@>=0.0.6, requests@>=2.31.0, uvicorn[standard]@>=0.24.0
- imessage-bots/src/bots/recap-bot/pyproject.toml: black@^23.11.0, fastapi@^0.104.1, flake8@^6.1.0, openai@^1.3.0, pydantic@^2.5.0, pytest@^7.4.3, python-dotenv@^1.0.0, requests@^2.31.0, uvicorn@^0.24.0
- imessage-bots/src/bots/recap-bot/requirements.txt: fastapi@==0.104.1, openai@==1.3.0, pydantic@==2.5.0, python-dotenv@==1.0.0, requests@==2.31.0, uvicorn@==0.24.0
- imessage-bots/src/bots/resume-roast/pyproject.toml: beautifulsoup4@>=4.12.0, fastapi[standard]@(>=0.115.13,<0.116.0), openai@>=1.0.0, pydantic@>=2.0.0, python-dotenv@>=1.0.0, python-multipart@>=0.0.6, requests@>=2.31.0, uvicorn[standard]@>=0.24.0
- imessage-bots/src/bots/resume-roast/requirements.txt: beautifulsoup4@>=4.12.0, fastapi@>=0.104.0, openai@>=1.0.0, pydantic@>=2.0.0, python-dotenv@>=1.0.0, python-multipart@>=0.0.6, requests@>=2.31.0, uvicorn[standard]@>=0.24.0
- pyproject.toml: apscheduler@^3.10.0, beautifulsoup4@^4.11.0, black@^23.0.0, fastapi@^0.100.0, flake8@^6.0.0, isort@^5.12.0, mypy@^1.0.0, openai@^1.0.0, pillow@^10.0.0, pydantic@^2.0.0, pytest@^7.0.0, pytest-asyncio@^0.21.0, requests@^2.28.0, sqlalchemy@^2.0.0, uvicorn@^0.20.0

### Recent commits (newest first)

- Update README.md
- Fix recap bot
- chore: move feedback bot
- fix: async middleware
- Add comprehensive GitBook documentation for iMessage Bot Framework
- Add SDK
- feedback-bot
- remove emojis
- Add recap bot
- feat: fixes
- gork-bot
- Merge remote-tracking branch 'refs/remotes/origin/main'
- feat: lover-bot
- Add scheduler bot
- add env.example
- initial commit

## Key source files (fetched from GitHub, selected and truncated for size)

### CONTRIBUTING.md

```markdown
# Contributing to iMessage Bot Framework

Thank you for your interest in contributing to the iMessage Bot Framework! We welcome contributions from everyone.

## Development Setup

1. **Clone the repository**
   ```bash
   git clone https://github.com/your-username/imessage-bot-framework.git
   cd imessage-bot-framework
   ```

2. **Install Poetry** (if you haven't already)
   ```bash
   curl -sSL https://install.python-poetry.org | python3 -
   ```

3. **Install dependencies**
   ```bash
   poetry install
   ```

4. **Activate the virtual environment**
   ```bash
   poetry shell
   ```

## Development Workflow

### Running Tests

```bash
# Run the SDK tests
poetry run python test_sdk.py

# Run with pytest (when available)
poetry run pytest
```

### Code Formatting

We use Black for code formatting and isort for import sorting:

```bash
# Format code
poetry run black .

# Sort imports
poetry run isort .

# Check formatting
poetry run black --check .
```

### Type Checking

We use mypy for type checking:

```bash
poetry run mypy imessage_bot_framework/
```

### Linting

We use flake8 for linting:

```bash
poetry run flake8 imessage_bot_framework/
```

## Testing Your Changes

1. **Test the CLI tool**
   ```bash
   poetry run imessage-bot create "Test Bot" --directory /tmp
   cd "/tmp/Test Bot"
   poetry install
   ```

2. **Test the examples**
   ```bash
   poetry run python examples/echo_bot.py
   poetry run python examples/command_bot.py
   ```

3. **Run the full test suite**
   ```bash
   poetry run python test_sdk.py
   ```

## Submitting Changes

1. **Fork the repository** on GitHub

2. **Create a feature branch**
   ```bash
   git checkout -b feature/your-feature-name
   ```

3. **Make your changes** and commit them:
   ```bash
   git add .
   git commit -m "Add your descriptive commit message"
   ```

4. **Run the tests** to ensure everything works:
   ```bash
   poetry run python test_sdk.py
   poetry run black --check .
   poetry run flake8 imessage_bot_framework/
   ```

5. **Push to your fork**
   ```bash
   git push origin feature/your-feature-name
   ```

6. **Create a Pull Request** on GitHub

## Code Style Guidelines

- Follow PEP 8 style guidelines
- Use type hints for all function parameters and return values
- Write docstrings for all public functions and classes
- Keep functions small and focused
- Use descriptive variable and function names

## Areas for Contribution

### High Priority
- **Documentation**: Improve README, add more examples
- **Testing**: Add comprehensive unit tests
- **Error Handling**: Improve error messages and handling
- **Performance**: Optimize webhook processing and state management

### Medium Priority
- **Plugins**: Create plugins for common use cases (AI, databases, etc.)
- **CLI Improvements**: Add more CLI commands and options
- **Middleware**: Add built-in middleware for common patterns
- **Examples**: Create more example bots

### Low Priority
- **Web Dashboard**: Admin interface for bot management
[truncated — 931 more characters]
```

### docs/SUMMARY.md

```markdown
# Table of contents

* [Introduction](README.md)

## Getting Started

* [Installation](getting-started/installation.md)
* [Quick Start](getting-started/quick-start.md)
* [Project Structure](getting-started/project-structure.md)

## Core Concepts

* [Bot Architecture](core-concepts/bot-architecture.md)
* [Message Handling](core-concepts/message-handling.md)
* [State Management](core-concepts/state-management.md)
* [Configuration](core-concepts/configuration.md)

## API Reference

* [Bot Class](api-reference/bot-class.md)
* [Message Class](api-reference/message-class.md)
* [Chat Class](api-reference/chat-class.md)
* [Decorators](api-reference/decorators.md)

## Advanced Features

* [Custom API Endpoints](advanced/custom-endpoints.md)
* [Middleware](advanced/middleware.md)
* [BlueBubbles Integration](advanced/bluebubbles-api.md)
* [Error Handling](advanced/error-handling.md)

## Examples & Tutorials

* [Basic Echo Bot](examples/echo-bot.md)
* [Command Bot](examples/command-bot.md)
* [AI Chat Bot](examples/ai-bot.md)
* [Advanced Patterns](examples/advanced-patterns.md)

## Best Practices

* [Code Organization](best-practices/code-organization.md)
* [Testing](best-practices/testing.md)
* [Deployment](best-practices/deployment.md)
* [Performance](best-practices/performance.md)

## CLI Tools

* [CLI Overview](cli/overview.md)
* [Project Creation](cli/project-creation.md)
* [Development Tools](cli/development-tools.md) 
```

### pyproject.toml

```
[tool.poetry]
name = "imessage-bot-framework"
version = "0.1.0"
description = "A simple, flexible framework for building iMessage bots"
authors = ["iMessage Bot Framework Team <contact@imessage-bot-framework.com>"]
readme = "README.md"
homepage = "https://github.com/your-username/imessage-bot-framework"
repository = "https://github.com/your-username/imessage-bot-framework"
documentation = "https://imessage-bot-framework.readthedocs.io/"
keywords = ["imessage", "bot", "framework", "chatbot", "bluebubbles"]
classifiers = [
    "Development Status :: 3 - Alpha",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: MIT License",
    "Operating System :: OS Independent",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.8",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Topic :: Communications :: Chat",
    "Topic :: Software Development :: Libraries :: Python Modules",
]
packages = [{include = "imessage_bot_framework"}]

[tool.poetry.dependencies]
python = "^3.8.1"
fastapi = "^0.100.0"
uvicorn = "^0.20.0"
pydantic = "^2.0.0"
requests = "^2.28.0"

[tool.poetry.group.dev.dependencies]
pytest = "^7.0.0"
pytest-asyncio = "^0.21.0"
black = "^23.0.0"
flake8 = "^6.0.0"
mypy = "^1.0.0"
isort = "^5.12.0"

[tool.poetry.group.plugins.dependencies]
openai = {version = "^1.0.0", optional = true}
sqlalchemy = {version = "^2.0.0", optional = true}
apscheduler = {version = "^3.10.0", optional = true}
beautifulsoup4 = {version = "^4.11.0", optional = true}
pillow = {version = "^10.0.0", optional = true}

[tool.poetry.extras]
ai = ["openai"]
database = ["sqlalchemy"]
scheduler = ["apscheduler"]
web = ["beautifulsoup4"]
image = ["pillow"]
all = ["openai", "sqlalchemy", "apscheduler", "beautifulsoup4", "pillow"]

[tool.poetry.scripts]
imessage-bot = "imessage_bot_framework.cli.main:main"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.black]
line-length = 88
target-version = ['py38']
include = '\.pyi?$'
extend-exclude = '''
/(
  # directories
  \.eggs
  | \.git
  | \.hg
  | \.mypy_cache
  | \.tox
  | \.venv
  | build
  | dist
)/
'''

[tool.isort]
profile = "black"
multi_line_output = 3
line_length = 88

[tool.mypy]
python_version = "3.8"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
strict_equality = true

[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = "test_*.py"
python_classes = "Test*"
python_functions = "test_*"
addopts = "-v --tb=short" 
```

### imessage-bots/src/bots/recap-bot/requirements.txt

```
fastapi==0.104.1
uvicorn==0.24.0
pydantic==2.5.0
requests==2.31.0
openai==1.3.0
python-dotenv==1.0.0 
```

### imessage-bots/src/bots/resume-roast/requirements.txt

```
fastapi>=0.104.0
uvicorn[standard]>=0.24.0
requests>=2.31.0
beautifulsoup4>=4.12.0
openai>=1.0.0
pydantic>=2.0.0
python-multipart>=0.0.6
python-dotenv>=1.0.0 
```

### imessage-bots/src/bots/meeting-scheduler/requirements.txt

```
fastapi[standard]>=0.115.13,<0.116.0
uvicorn[standard]>=0.24.0
requests>=2.31.0
openai>=1.0.0
pydantic>=2.0.0
python-multipart>=0.0.6
python-dotenv>=1.0.0
google-api-python-client>=2.0.0
google-auth-httplib2>=0.2.0
google-auth-oauthlib>=1.0.0
python-dateutil>=2.8.0 
```

### imessage-bots/src/bots/lover-bot-sdk/pyproject.toml

```
[tool.poetry]
name = "lover-bot-sdk"
version = "2.0.0"
description = "An AI girlfriend bot built with the iMessage Bot Framework"
authors = ["Your Name <your.email@example.com>"]
readme = "README.md"
package-mode = false

[tool.poetry.dependencies]
python = "^3.8.1"
openai = "^1.0.0"
python-dotenv = "^1.0.0"
imessage-bot-framework = {path = "../../../../", develop = true}

[tool.poetry.group.dev.dependencies]
pytest = "^7.0.0"
black = "^23.0.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api" 
```

### imessage-bots/src/bots/recap-bot/pyproject.toml

```
[tool.poetry]
name = "recap-bot"
version = "0.1.0"
description = "iMessage bot that recaps unread messages in group chats"
authors = ["Your Name <your.email@example.com>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.9"
fastapi = "^0.104.1"
uvicorn = "^0.24.0"
pydantic = "^2.5.0"
requests = "^2.31.0"
openai = "^1.3.0"
python-dotenv = "^1.0.0"

[tool.poetry.group.dev.dependencies]
pytest = "^7.4.3"
black = "^23.11.0"
flake8 = "^6.1.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api" 
```

### imessage-bots/src/bots/resume-roast/pyproject.toml

```
[project]
name = "resume-roast"
version = "0.1.0"
description = "A snarky resume roasting chatbot for iMessage via BlueBubbles"
authors = [
    {name = "Shrey Pandya",email = "shrey150@yahoo.com"}
]
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
    "fastapi[standard] (>=0.115.13,<0.116.0)",
    "uvicorn[standard]>=0.24.0",
    "requests>=2.31.0",
    "beautifulsoup4>=4.12.0",
    "openai>=1.0.0",
    "pydantic>=2.0.0",
    "python-multipart>=0.0.6",
    "python-dotenv>=1.0.0",
]


[build-system]
requires = ["poetry-core>=2.0.0,<3.0.0"]
build-backend = "poetry.core.masonry.api"

```

### imessage-bots/src/bots/gork-bot/pyproject.toml

```
[tool.poetry]
name = "gork-bot"
version = "0.1.0"
description = "A sarcastic and snarky bot inspired by Grok that explains previous messages"
authors = ["Mihir Arya <mihir@example.com>"]
readme = "README.md"
package-mode = false

[tool.poetry.dependencies]
python = ">=3.13"
fastapi = {extras = ["standard"], version = ">=0.115.13,<0.116.0"}
uvicorn = {extras = ["standard"], version = ">=0.24.0"}
requests = ">=2.31.0"
openai = ">=1.0.0"
pydantic = ">=2.0.0"
python-multipart = ">=0.0.6"
python-dotenv = ">=1.0.0"

[build-system]
requires = ["poetry-core>=2.0.0,<3.0.0"]
build-backend = "poetry.core.masonry.api" 
```

[72 more indexed source files omitted to keep this export small. The full file list is in the Codebase structure section above.]