Back to the catalog

email-notifier

Sends an email notification via Gmail when a Gemini CLI task completes.

Open source Open in the app JSON README (API)

About

Sends an email notification via Gmail when a Gemini CLI task completes.

Details

Kind
Plugins
Topic
Communication
Publisher
wseabra
Origin
gemini
Category
ferramentas
Version
1.0.0
Stars
1
Forks
1
Open pull requests
1
Last push
2026-01-04T19:15:12Z
Repository state
ativo
Language
Python
Added
2026-08-30 14:13:39
Updated
2026-08-30 14:13:39
Origin id
wseabra/gemini-email-notifier

README

# Gemini Email Notifier

A Gemini CLI extension that sends an email notification via Gmail when a long task completes.

## Prerequisites

- Python 3.x
- A Google Cloud Console project with the Gmail API enabled.

## Installation

1.  **Dependencies**:
    Install the required Python packages:
    ```bash
    pip install -r requirements.txt
    ```

2.  **Google OAuth Setup (Step-by-Step)**:
    - Go to the [Google Cloud Console Credentials page](https://console.cloud.google.com/apis/credentials).
    - **Create/Select Project**: Ensure you have a project selected in the top bar.
    - **Enable Gmail API**: Click "Library" on the left, search for "Gmail API", and click "Enable".
    - **Consent Screen**: 
        - Go to "OAuth consent screen".
        - Choose "External".
        - Fill in "App name" (e.g., Gemini Notifier) and your email.
        - **Important**: In the "Test users" section, click "ADD USERS" and add your own Gmail address.
    - **Create Credentials**:
        - Go to the "Credentials" tab.
        - Click "+ CREATE CREDENTIALS" -> "OAuth client ID".
        - Select "Desktop App" as the type.
        - Click "Create", then "DOWNLOAD JSON" on the next screen.
    - **File Placement**: Rename the downloaded file to `client_secret.json` and place it in the root of the `gemini-email-notifier/` folder.

## Setup & Usage

1.  **Login**:
    Authenticate the extension with your Google account by running the following command in the Gemini CLI:
    ```
    /email:login
    ```
    This will open a browser window for authentication. Once completed, a `token.json` file will be created in the extension root.

2.  **Automatic Notifications**:
    Once logged in, the extension automatically hooks into `AfterAgent`. Whenever a task finishes, you will receive an email at your authenticated Gmail address with the subject "Gemini Task Finished".

## Project Structure

- `gemini-extension.json`: Extension metadata and command registration.
- `commands/login.py`: Handles OAuth 2.0 authentication.
- `hooks/hooks.json`: Registers the `AfterAgent` hook.
- `hooks/notify.py`: Implementation of the email notification logic.

More