Generate commit messages using GPT-3. To use gpt-commit
, simply invoke it whenever you’d use git commit
. Git will prompt you to edit the generated commit message.
git add .
./gpt-commit.py
Getting Started
Install openai
and clone gpt-commit
.
pip3 install openai
git clone git@github.com:markuswt/gpt-commit.git
Set the environment variable OPENAI_API_KEY
to your OpenAI API key, e.g. by adding the following line to your .bashrc
.
Alternatively, you can set the
Modify
openai.api_key
variable in gpt-commit.py
. You can also set openai.organization
this way (optional).
git commit
(optional)
Modify If you want git commit
to automatically invoke gpt-commit
, copy gpt-commit.py
and pre
Show comments (13)