Skip to content

wseabra/gemini-email-notifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

    pip install -r requirements.txt
  2. Google OAuth Setup (Step-by-Step):

    • Go to the Google Cloud Console Credentials page.
    • 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages