Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Git Commit Message Generator

Overview

This CLI tool generates Git commit messages using an LLM. It analyzes staged changes and provides a suggested commit message so devs can focus on writing code instead of commit messages. It can also generate humorous commit messages for fun.

Setup

  1. Clone the Repository:

    git clone https://github.com/SubhasmitaSw/commitgen.git
    cd commitgen
  2. Create a .env File:

    • Copy .env.example to .env:
      cp .env.example .env
    • Edit .env and add your Relax AI API key or replace with your preferred LLM API key.

Installation

Using Virtual Environment

  1. Create a Virtual Environment:

    python -m venv venv
  2. Activate the Virtual Environment:

    • On Windows:
      venv\Scripts\activate
    • On macOS/Linux:
      source venv/bin/activate
  3. Install the Package:

    pip install .

Using --user Flag

  1. Install the Package:
    pip install --user .

Using Poetry (Optional)

If you have Poetry installed, you can also use it to manage dependencies.

  1. Install Poetry: Follow the instructions on the Poetry installation page.

  2. Install Dependencies:

    poetry install

Global Usage

  1. Stage Your Changes:

    git add .
  2. Generate a Commit Message:

    commitgen
  3. Review and Commit:

    • Review the suggested commit message.
    • Confirm or edit the message to commit.

Flags

  • --bonkers: Go bonkers and generate a humorous commit message.

Contributing

Contributions are welcome! Please fork the repository and submit a pull request.

License

This project is licensed under the MIT License.

About

Because writing git commit messages is so last season. Let AI do it for you!

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages