Metadata-Version: 2.4
Name: daily-summary-agent
Version: 0.1.1
Summary: AI-powered standup email agent — summarizes your GitHub commits and Jira tickets before every meeting.
License: MIT
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: google-genai>=1.0.0
Requires-Dist: google-api-python-client>=2.100.0
Requires-Dist: google-auth-httplib2>=0.2.0
Requires-Dist: google-auth-oauthlib>=1.2.0
Requires-Dist: PyGithub>=2.1.0
Requires-Dist: jira>=3.6.0
Requires-Dist: APScheduler>=3.10.0
Requires-Dist: python-dotenv>=1.0.0

# Daily Summary Agent

Automatically emails you a standup summary before every meeting — what you worked on (from GitHub commits), what's in progress (from Jira), and any blockers. Powered by Gemini.

## How it works

1. Runs in the background, checking your Google Calendar every 5 minutes
2. When a meeting is ~1 hour away, it fetches your recent GitHub commits and active Jira tickets
3. Generates a concise standup summary using Gemini
4. Emails it to you before the meeting starts

---

## Installation

```bash
pip install daily-summary-agent
```

Requires Python 3.11+.

---

## Setup

Run the interactive setup wizard — it walks you through everything:

```bash
daily-summary-agent setup
```

The wizard will ask for:

| What | Where to get it |
|---|---|
| **Gemini API key** | [aistudio.google.com/app/apikey](https://aistudio.google.com/app/apikey) |
| **GitHub token** | [github.com/settings/tokens](https://github.com/settings/tokens) → Generate new token (classic) → `repo` scope |
| **GitHub username** | Your GitHub handle (e.g. `john-doe`) |
| **Gmail address** | Your Gmail address |
| **Gmail App Password** | [myaccount.google.com/apppasswords](https://myaccount.google.com/apppasswords) — requires 2FA enabled |
| **Jira** | Optional — press Enter to skip |
| **Google credentials.json** | See below |

### Getting credentials.json (one-time)

1. Go to [console.cloud.google.com](https://console.cloud.google.com)
2. Create a project → **APIs & Services → Enable APIs** → enable **Google Calendar API**
3. **APIs & Services → Credentials → Create Credentials → OAuth 2.0 Client ID**
4. Choose **Desktop App** → download the JSON file
5. Provide the path to that file when the wizard asks

All credentials are stored in `~/.daily-summary-agent/` on your machine — nothing is committed to the repo.

---

## Running

```bash
daily-summary-agent start
```

On first run, a browser window opens asking you to grant Google Calendar read access. After you approve, it's saved automatically and all future starts are silent.

### Run in the background with Docker

```bash
# Run locally once first to complete the Google Calendar browser auth
daily-summary-agent start   # approve in browser, then Ctrl+C

# Then run persistently in Docker
docker compose up -d
docker compose logs -f
```

---

## Configuration

After setup, you can edit `~/.daily-summary-agent/config.env` to change these:

| Variable | Default | Description |
|---|---|---|
| `MEETING_ALERT_MINUTES` | `60` | Send email this many minutes before the meeting |
| `CHECK_INTERVAL_MINUTES` | `5` | How often to poll Google Calendar |

---

## Project structure

```
daily_summary_agent/
  cli.py               # Entry point — setup wizard + start command
  config.py            # Config loading from ~/.daily-summary-agent/
  agent.py             # Gemini summarization
  scheduler.py         # APScheduler polling loop
  integrations/
    calendar.py        # Google Calendar
    github.py          # GitHub commits (all branches, including org repos)
    jira_client.py     # Jira tickets
    email_sender.py    # SMTP email
```

---

## Contributing

Issues and PRs welcome at [github.com/naga-a11y/daily-summary-agent](https://github.com/naga-a11y/daily-summary-agent).
