Skip to content

A git prepare-commit-msg hook for authoring commit messages with GPT-3.

License

Notifications You must be signed in to change notification settings

ilannn/gptcommithook

 
 

Repository files navigation

gptcommit

Github Contributors Github Stars CI

crates.io status crates.io downloads Rust dependency status

A git prepare-commit-msg hook for authoring commit messages with GPT-3. With this tool, you can easily generate clear, comprehensive and descriptive commit messages letting you focus on writing code.

See announcement blog post.

Demo

asciicast

Installation

  1. Install this tool locally with cargo.
cargo install --locked gptcommit
  1. In your git repository, run the following command to install gptcommit as a git prepare-commit-msg hook. You will need to provide an OpenAI API key to complete the installation.
gptcommit install

Usage

To use gptcommit, simply run git commit as you normally would. The hook will automatically generate a commit message for you using GPT-3. If you're not satisfied with the generated message, you can always edit it before committing.

Note: By default, gptcommit uses the GPT-3 model. Please ensure you have sufficient credits in your OpenAI account to use it.

n.b. If your OpenAI API key has changed, simply re-run gptcommit install.

Encountered any bugs?

If you encounter any bugs or have any suggestions for improvements, please open an issue on the repository.

License

This project is licensed under the MIT License.

About

A git prepare-commit-msg hook for authoring commit messages with GPT-3.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 82.7%
  • Shell 11.1%
  • Just 6.2%