Skip to content

NeuralFalconYT/AI-Grammar-Fixer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Grammar Fixer

A lightweight background application that corrects grammar, spelling, and punctuation using the Google Gemini API. Triggered by a simple hotkey, it seamlessly integrates into your workflow, enhancing text accuracy across various applications.


Features

  • System Tray Operation: Runs silently in the background without a terminal window.
  • Hotkey Activation: Press Ctrl + ; to correct selected text instantly.
  • Powered by Google Gemini API: Utilizes the latest LLM from Google for grammar and spelling corrections.
  • Clipboard Management: Automatically copies corrected text back to the clipboard.
  • Cross-Application Compatibility: Works with any application where text can be copied and pasted.

Installation

  1. Clone the Repository:

    git clone https://github.com/NeuralFalconYT/AI-Grammar-Fixer.git
    cd AI-Grammar-Fixer
  2. Install Dependencies:

    pip install -r requirements.txt
  3. Set Up Google Gemini API Key:

    • Sign In: Visit Google AI Studio and sign in with your Google account.

    • Generate API Key: Navigate to https://aistudio.google.com/apikey and create a new API key.

    • Store the Key: Create a .env file in the project root and add your API key:

      Gemini_API=YOUR_GOOGLE_GEMINI_API_KEY
      
  4. Run the Application:

    python app.py

    The application will start, and an icon will appear in your system tray.


Usage

  • Activate: Select any text in an application and press Ctrl + ;.
  • Corrected Text: The selected text will be replaced with its corrected version using Google Gemini.
  • Exit: Right-click the system tray icon and select Quit to close the application.

Customization

  • Hotkey: Modify the hotkey by editing the keyboard.add_hotkey() function in app.py.
  • API Integration: Currently uses Google Gemini API. You can update the generate_script() function to integrate with other APIs if desired.

How to Get a Free Gemini API Key

  1. Sign in to Google AI Studio Visit Google AI Studio and sign in with your Google account.

    1

  2. Navigate to the API Keys Page Click on “Create API Key” to generate a new key.

    2

  3. Select a Project Choose an existing project or create a new one.

    3

  4. Copy Your API Key Once the key is generated, copy it to a safe place.

    4

  5. Set Up Your .env File Inside the project folder AI-Grammar-Fixer, create a file named .env and add your Gemini API key:

    Gemini_API=YOUR_API_KEY_HERE
    

    5

About

A lightweight background app that fixes grammar, spelling, and punctuation with any LLM API - triggered by a simple hotkey

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages