This script automatically generates a commit message for staged changes in a git repository using OpenAI's API.
It tries to enforce the contributing guidelines for a good commit message.
Unfortunately, this doesn't always work. If you have ideas for a better prompt, please let me know!
OPENAI_API_KEY
environment variable with a valid OpenAI API keyjq
curl
Put this script into your PATH
and run it inside a git repository with
staged changes:
$ gcm