Skip to content

AI GIT Commit is your ultimate command-line ally, revolutionizing your Git experience. With the remarkable power of OpenAI's GPT-3 language model at your fingertips, it effortlessly crafts compelling commit messages for your Git commits, making every step of your coding journey a breeze.

License

Notifications You must be signed in to change notification settings

chrispeterjeyaraj/ai-gitcommit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ai-gitcommit

AI Git Commit is a command-line tool that leverages OpenAI's GPT-3 language model to simplify the process of creating commit messages for Git commits. It addresses the common challenge of spending excessive time crafting commit messages that effectively describe code changes. With AI Commit, developers can generate a variety of high-quality commit message options within seconds, reducing the time spent on writing commit messages and allowing them to focus more on coding.

Go

Prerequisites 📋

Before installing AI Git Commit, you will need to generate your OpenAI API key.

You will also need to have GoLang installed. To check if you have Go installed, open your terminal window and run the following command:

go --version

If you see a version number in the output, it means that Go is installed. If not, you can download and install go using the below documentation:

https://go.dev/doc/install

Installation 📥

To install AI Git Commit, please follow the steps below:

  1. Clone the AI GIT Commit repository to your local machine by running the following command in your terminal:
git clone https://github.com/chrispeterjeyaraj/ai-gitcommit
  1. Navigate into the cloned repository by running the following command in your terminal:
cd gpt-gitcommits
  1. Run the install.sh script by running the following command in your terminal:
./install.sh

This will install the required Go packages, copy the gptcommit executable to your /usr/local/bin directory, and add an alias to your .bashrc file.

Usage ⚡

To use GPT GIT Commit, do the following:

  1. Export your OpenAI API key as an environment variable by running:
export OPENAI_API_KEY="YOUR_API_KEY_HERE"
  1. Navigate to the directory of the Git repository you wish to commit changes to, and run the following command in your terminal:
aigitcommit

This will prompt AI Commit to generate a commit message based on your changes. The generated message will be displayed, along with the option to either accept it (y), reject it and generate a new one (n), or edit it manually (e). If you choose to edit it manually, you will be prompted to enter your desired commit message.

Note: AI Commit generates one commit message at a time, with the option to generate more if the initial message is rejected.

Uninstallation 📤

To uninstall AI Commit, please follow the steps below:

  1. Navigate to the directory where you cloned the AI Commit repository by running the following command in your terminal:
cd <path-to-aicommits-repo>
  1. Run the uninstall.sh script by running the following command in your terminal:
./uninstall.sh

This will remove the gitcommit executable from your /usr/local/bin directory, remove the alias from your .bashrc file, and uninstall the required Python packages.

Contribution 🙌

I welcome contributions from the community! If you find a bug 🐛 or have an idea for a new feature 💡, please open an issue or submit a pull request.

LICENSE 📜

AI Commit is licensed under the MIT License. See the LICENSE file for more information.


  • If you found AI GIT Commit useful, please consider giving this repo a star ⭐️!

About

AI GIT Commit is your ultimate command-line ally, revolutionizing your Git experience. With the remarkable power of OpenAI's GPT-3 language model at your fingertips, it effortlessly crafts compelling commit messages for your Git commits, making every step of your coding journey a breeze.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published