comsu
1.0.0


COMSU是一种简单而功能强大的命令行工具,它利用Google Generative AI根据您的GIT上演更改建议高质量,简洁的提交消息。自动化编写有意义的提交消息的过程并确保您的项目一致性。
feat , fix , build , chore等)。要在Linux系统上设置COMSU ,请按照以下步骤:
克隆存储库:
git clone https://github.com/ali-hv/comsu.git
cd comsu运行安装脚本:
chmod +x install.sh
sudo ./install.sh设置您的API密钥:
确保您将Google AI Studio API密钥集作为环境变量。如果您没有一个,则可以在此处创建一个免费的API键。
export GOOGLE_AI_STUDIO_API_KEY= " your_api_key_here "您可以将此行添加到您的~/.bashrc或~/.zshrc中,以使其持久。
要在Windows系统上设置COMSU ,请按照以下步骤:
克隆存储库:打开PowerShell作为管理员,然后编写以下命令:
git clone https: // github.com / ali - hv / comsu.git
cd comsu运行安装脚本:
powershell - ExecutionPolicy Bypass - File install.ps1设置您的API密钥:
确保您将Google AI Studio API密钥集作为环境变量。如果您没有一个,则可以在此处创建一个免费的API键。
set GOOGLE_AI_STUDIO_API_KEY = your_api_key_here您可以将此行添加到$路径中以使其持久。
安装后,您可以从上演更改的任何目录中运行COMSU :
git comsu在CMD中运行此操作:
git-comsu如果您居住在受Google限制的国家 /地区,则可能需要使用VPN或更改DNS。
这将根据您的更改生成建议的提交消息的列表,您可以选择所需的消息,然后它将自动使用该消息提交更改。如果您不喜欢任何消息,则可以输入“ X”退出。
例子
git add .
git comsu输出:
Generating the commit messages based on your changes ...
1. ref: Refactor the send_email function for efficiency
2. ref: Update the send_email to reduce processing time
3. feat: Use new method for getting the changes in send_email
Write the message number you want to use (write 'x' to exit): 1
[main 6b25961] ref: Refactor the send_email function for efficiency
1 file changed, 1 deletion(-)
Committed successfully.
用于生成该提交消息的提示存储在位于/usr/local/local/share/git-comsu/提示的名为提示的文件中。您可以修改此文件以更改AI生成提交消息的方式。
欢迎贡献,问题和功能请求!随时检查问题页面。
如果您发现此工具很有帮助,请给予存储库!