Skip to content

yankeexe/ai-gen-commit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐙 AI Commit Generator

Use AI to generate commit message for your staged changes.

⚡️ Features

  • Use local models (via Ollama) or remote models (OpenAI/Gemini)
  • Use your preferred AI model
  • Regenerate commit messages until you find the perfect one
  • Simple CLI interface with debug mode

⚡️ Install

pip install ai-gen-commit

✨ Generate Commit messages

In any git directory with staged changes, run:

aic

🔍 Run in debug mode

aic -d

🦙 Local Mode [Specify model to use]

aic -m <model-name>

aic -m "llama3.2:3b"

# OR

export OLLAMA_MODEL="llama3.2:3b"

🛜 Remote Mode

⚠️ Only supports OpenAI and Gemini models for now.

To run in remote mode, export your OpenAI or Gemini API keys as:

export OPENAI_API_KEY=<openai-or-gemini-api-key>

then enable remote mode:

aic -r

Specify the model to use based on the provider's API key:

# For OpenAI
aic -r -m "gpt-4o-2024-11-20"

# For Gemini
aic -r -m "gemini-1.5-flash"

Getting Help

aic -h

🔨 Development

👀 Prerequisites Local mode [default]

🚀 Setting up

make setup