aicommit-rs

Crates.ioaicommit-rs
lib.rsaicommit-rs
version0.0.9
created_at2025-06-22 20:11:38.672438+00
updated_at2025-12-10 14:21:14.445668+00
descriptionSmall CLI AI git commit generator that works with any OpenAI compatible enpoint
homepage
repository
max_upload_size
id1721895
size89,316
Shukhrat Mukimov (mufasa71)

documentation

README

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:

cargo build --path .

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:


[tools]
"ubi:your_github_name/aicommit-rs" = "v0.0.8"

Copy aicommit.toml and aicommit-template into your home directory:

cp examples/aicommit.toml ~/.aicommit.toml
cp examples/aicommit-template ~/.aicommit-template

Replace ~/.aicommit.toml with your own configuration file.

openai_api_key = ""
openai_api_url = "https://api.groq.com/openai/v1"
model_name = "llama-3.3-70b-versatile"

Or through environment variables:

OPENAI_API_KEY=your-api-key aicommit-rs

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 }}"
Commit count: 0

cargo fmt