aicommit-rs 🔨 (in progress)
Using Google Gemini to generate git comments.
Read examples/aicommit-template to understand what exactly is generated.
Installation
Build from source
Clone the repository and build the project:
Add ~/.cargo/bin/ into your PATH.
Download pre-built binaries
You can download pre-built binaries in releases section.
If you use mise, add following lines to your ~/.config/mise/config.toml:
[]
= "v0.0.8"
Copy aicommit.toml and aicommit-template into your home directory:
Replace ~/.aicommit.toml with your own configuration file.
Or through environment variables:
OPENAI_API_KEY=your-api-key
Follow instructions to get your API key from Google Gemini
CLI flags and arguments
Read docs/usage.md for more information.
Examples
lazygit
Add following as a menu custom command in your ~/.config/lazygit/config.yml:
customCommands:
- key: "<c-a>" # Ctrl + a
description: "pick AI commit"
command: 'git commit -m "{{.Form.Msg}}"'
context: "files"
prompts:
- type: "menuFromCommand"
title: "ai Commits"
key: "Msg"
command: "aicommit-rs"
filter: '^(?P<number>\d+)\.\s(?P<message>.+)$'
valueFormat: "{{ .message }}"
labelFormat: "{{ .number }}: {{ .message | green }}"