一个用 Swift 构建的命令行工具,使用 OpenAI 的 ChatGPT 生成提交消息

提交 GPT

CommitlogGPT 是一个使用 Swift 构建的命令行工具,它使用 OpenAI 的 ChatGPT 生成提交消息。它的灵感来自 RomanHotsiy/commitgpt,旨在提供一种简单的方法来为您的 Git 存储库创建有意义的提交消息。

先决条件

  • Swift 5.5 或更高版本
  • OpenAI API 密钥

安装

将此存储库克隆到本地计算机:

git clone https://github.com/huiping192/commitlogGPT.git
cd commitlogGPT
swift build -c release
cp .build/release/clg /usr/local/bin/clg

用法

运行项目:

clg

The tool will analyze your staged changes in your Git repository and generate commit messages using ChatGPT. You can select one of the suggested commit messages, or ask for more options.

example

example gif

Contributing

Contributions are welcome! Feel free to submit a pull request or create an issue for any suggestions or improvements.

License

This project is licensed under the MIT License. See the LICENSE file for details.

GitHub

点击跳转