Commit GPT
Generates commit messages for your staged (but unpushed) commits using ChatGPT.
Prerequisites
- Create an account & generate an API key for OpenAI.
- Add your API key as an environment variable:
Installation
Usage
Options
-p, --prompt <PROMPT> The prompt to use when generating the commit message [default: "Generate a Git commit message based on the following diff:"]
-m, --model <MODEL> Which GPT model to use [default: gpt4] [possible values: gpt4, gpt35]
-t, --tokens <TOKENS> The maximum amount of tokens to generate. Tokens as pieces of words, where 1,000 tokens is about 750 words [default: 512]
-h, --help Print help
-V, --version Print version
- GPT 4 works much better than GPT 3.5, so I suggest sticking with the default.
- As you get billed per token, be careful when increasing the
tokens
parameter. I suggest setting a Usage Limit to be sure.