ahnafaf / GCalendarApp

https://gcalendarapp.vercel.app
1 stars 0 forks source link

Google Calendar Assistant

Overview

This project is a Node.js-based command-line application that integrates with Google Calendar, allowing users to manage their calendar events through natural language interactions. It uses OpenAI's GPT model to interpret user inputs and perform calendar operations.

Why use this?

Features

Prerequisites

Before you begin, ensure you have met the following requirements:

Installation

  1. Clone the repository:

    git clone https://github.com/ahnafaf/google-calendar-assistant.git
    cd google-calendar-assistant
  2. Install the dependencies:

    npm install
  3. Set up your Google Cloud Project and obtain the necessary credentials:

    • Go to the Google Cloud Console
    • Create a new project or select an existing one
    • Enable the Google Calendar API for your project
    • Create credentials (OAuth 2.0 Client ID) for a desktop application
    • Download the credentials JSON file and save it as credentials.json in the project root directory
  4. Set up your OpenAI API key:

    • Create a .env file in the project root
    • Add your OpenAI API key to the .env file:
      OPENAI_API_KEY=your_api_key_here

Usage

To start the application, run:

node main

On first run, you'll be prompted to authorize the application with your Google account. Follow the provided URL, grant the necessary permissions, and enter the authorization code when prompted.

Once authorized, you can interact with the assistant using natural language. Here are some example commands:

Type 'exit' to quit the application.

File Structure

Configuration

The application uses the following environment variables:

These should be set in the .env file.

Troubleshooting

Contributing

Contributions to this project are welcome. Please fork the repository and submit a pull request with your changes.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments