前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >【大家的项目】一个调用大模型生成Git commit message的工具

【大家的项目】一个调用大模型生成Git commit message的工具

作者头像
MikeLoveRust
发布2024-05-29 13:02:44
1920
发布2024-05-29 13:02:44
举报
文章被收录于专栏:Rust语言学习交流

https://github.com/yzzting/commit_crafter

一个由大模型驱动的Git提交消息生成器。它旨在通过自动生成基于您的更改而有意义的提交消息,帮助您节省时间。非常适合独立项目或团队协作,可以使您的提交日志整洁易读 Commit Crafter

Installation

cargo install --locked commit_crafter In the git project, install the prepare-commit-msg hook and set up the OpenAI API key to use it. If it is the first time installing and using it.

commit_crafter install After executing the installation command, you must first set up a key in order to use it normally.

commit_crafter config set openai_api_keyOptions

openai api key

commit_crafter config set openai_api_key

openai url

commit_crafter config set openai_url

openai model

commit_crafter config set openai_model

prompt language

commit_crafter config set user_language

get config options

commit_crafter config get

get all config options

commit_crafter config list

The default file path is $HOME/.config/commit_crafter/config.toml

Usage

After correctly installing the hook, execute "git commit -a" in the git project. In the temporary Vim editor interface that opens, there will be generated commit information. The prerequisite is that all files have been staged for commit.

prerequisites

git add . // or git add

git commit -a

本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2024-05-17,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 Rust语言学习交流 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • openai api key
  • openai url
  • openai model
  • prompt language
  • get config options
  • get all config options
  • prerequisites
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档