https://github.com/Nutlope/aicommits
npm install -g aicommits
https://platform.openai.com/account/api-keys
aicommits config set OPENAI_KEY=<your token>
設定が完了するとホームディレクトリに .aicommits というファイルが作成されます。
git add -A
aicommits
オプションなしの aicommits を実行すると、コミットメッセージの候補を1つだけ表示してこれでいいか Yes , No で聞いてきます。 よければ Yes を選択するとコミットされます。
--type conventional
(または)
-t conventional
以下のようなメッセージになります。
style: Remove unnecessary gap in Header module
feat: allow provided config object to extend other configs
Conventional Commits
https://www.conventionalcommits.org/en/v1.0.0/
以下のようにすると 3件の候補を出してくれます
--generate 3
(または)
-g 3
aicommits --generate 3 --type conventional
スニペットに入れるか、シェルのコマンドにしておくと良いでしょう。