A CLI written in Go language that writes git commit messages for you using ChatGPT AI (gpt-3.5-turbo model) and automatically installs a git prepare-c

GitHub - appleboy/CodeGPT: A CLI written in Go language that writes git commit messages for you using ChatGPT AI (gpt-3.5-turbo model) and automatically installs a git prepare-commit-msg hook.

submited by
Style Pass
2023-03-16 04:00:08

A CLI written in Go language that writes git commit messages for you using ChatGPT AI (gpt-3.5-turbo model) and automatically installs a git prepare-commit-msg hook.

An environment variable is a variable that is set on your operating system, rather than within your application. It consists of a name and value.We recommend that you set the name of the variable to OPENAI_API_KEY.

This will create a .codegpt.yaml file in your home directory ($HOME/.config/codegpt/.codegpt.yaml). The following options are available.

There are two methods for generating a commit message using the codegpt command. The first is CLI mode, and the second is Git Hook.

You can also use the prepare-commit-msg hook to integrate codegpt with Git. This allows you to use Git normally and edit the commit message before committing.

codegpt will generate the commit message for you and pass it back to Git. Git will open it with the configured editor for you to review/edit it. Then, to commit, save and close the editor!

Leave a Comment