aicommit

项目主页: https://github.com/mingeme/aicommit

背景

开发初衷是希望有个工具能一键生成 git 的提交信息,一开始是在 gpt 网页对话,复制粘贴,略显麻烦。github 关键字一搜 aicommit 也有很多项目,都能用,基于能自己造轮子就自己造轮子的心态,还是忍不住又复刻一遍,整个项目 95% 都通过 windsurf 生成,整体目标是尽量保证简单方便使用。

mac 用户安装:

brew install mingeme/tap/aicommit

使用方式:

$ # 使用阿里千问大模型,可以在百练申请 api 免费试用 180 天(不是广告),大家可以先尝试用我的体验一下
$ aicommit auth add qwen sk-e6234945f70d48a6b1f1b5934ba6fd68
$ git add .
$ aicommit

showcase

功能

  • 支持自定义提示词
  • 忽略自定义文件的变更
$ aicommit prompt init # 初始化配置文件在当前目录 .aicommit.yml
$ aicommit prompt init -g # 初始化配置文件在全局目录 ~/.config/aicommit/.aicommit.yml

这里贴出我的配置

.aicommit.yml

prompt:
  system: |
    You are a helpful assistant that generates clear and concise git commit messages. Follow conventional commits format. Disable markdown in the response.
  user: |
    Please generate a commit message for the following git diff:

    {{diff}}
# 支持忽略自定义文件的变更
exclude:
  - 'package-lock.json'

举报· 310 次点击
登录 注册 站外分享
2 条回复  
HMYDK 初学 3 天前
直接命令行还是很帅的。 用 jetbrains 的话可以看下我做的这个( https://ai-commit.com/)
zhaoyy0513 初学 3 天前
@HMYDK 404 了哥们
返回顶部