GIM 1.5 发布了,现在支持Windows系统使用了。
这样 GIM 就覆盖 Mac, Linux, Windows 三大平台了
新功能
本次更新给 prompt
命令增加了 --reset
选项,可以将提示词重置为初始状态(即程序内置的提示词):
# Reset both diff and subject prompts to default
# By removing prompt files if they exist
gim prompt --reset
平台支持
现在三大平台(Mac, Linux, Windows )都可以通过源码直接安装了:
git clone https://github.com/davelet/git-intelligence-message.git
cd git-intelligence-message
cargo install --path .
也都支持二进制文件的安装了。
Mac、Linux
brew install davelet/gim/git-intelligence-message
gim -h
Windows
scoop bucket add davelet https://github.com/davelet/scoop-gim.git
scoop install git-intelligence-message
gim -h
推荐用法
gim 根据暂存区的文件变更内容生成提交消息并提交
gim -a 自动暂存尚未暂存的变更,并生成提交消息提交
gim -p 将本次暂存的变更内容合并到上一次提交中,并根据这两次变更生成提交消息提交(就是--amend)
gim -ap 相当于gim -a后gim -p,先暂存,再合并提交
gim -t <SUB> 指定提交的标题。不指定-t参数的话,标题是根据消息内容自动总结出来的
gim update 更新软件版本,也可以brew upgrade git-intelligence-message
gim ai -m <model> -k <apikey> -u <url> -l <language> 设置AI参数。这个命令是前置命令,没有设置的话,上面携带参数的执行都会失败。-l有默认值,是英语,可以不用提供;-u是api调用的地址,软件内置了一些地址,可以查看 https://github.com/davelet/git-intelligence-message?tab=readme-ov-file#built-in-model-support ,如果模型名称能匹配上前缀也可以不提供。1.3.2版本开始,如果gim ai命令没携带参数,将输出当前配置
gim -v 任何命令都可以增加-v参数,用于查看命令的详细执行过程,v表示 verbose
gim prompt 查看当前提示词。增加--edit可以编辑提示词,增加--prompt <P>用于指定编辑文件
更详细的用法可以通过-h查看帮助信息。比如
gim -h
gim ai -h
gim update -h
gim prompt -h