commitai

Crates.iocommitai
lib.rscommitai
version0.1.1
sourcesrc
created_at2024-11-16 09:43:47.532401
updated_at2024-11-16 11:19:35.477261
descriptionThis is an ai commit message generator
homepage
repository
max_upload_size
id1450268
size67,975
Sidharth Babu (sidhuiwnl)

documentation

README

CommitAI

AI-powered git commit message generator using Google's Gemini API.

Installation

cargo install commitai

Setup

  1. Get a Google API key from Google AI Studio

  2. Create a config file:

Linux/macOS:

mkdir -p ~/.config/commitai
echo "GOOGLE_API_KEY=your_api_key_here" > ~/.config/commitai/config

Windows:

mkdir -p $env:APPDATA\commitai
echo "GOOGLE_API_KEY=your_api_key_here" > $env:APPDATA\commitai\config

Usage

  1. Stage your changes:
git add .
  1. Generate commit message:
commitai
  1. Choose what to do with the generated message:
  • y - Use the message and commit
  • e - Edit the message before committing
  • n - Cancel without committing

Features

  • Generates contextual commit messages based on staged changes
  • Follows conventional commit format
  • Supports message editing with your preferred editor
  • Color-coded status messages
  • Automatic retry with backoff

License

This project is licensed under the MIT License - see the LICENSE file for details.

Commit count: 0

cargo fmt