AI-Powered Conventional Commits Generator for Git
- π€ Generate Conventional Commits via LLMs
- π¦ Rust-native performance with <1ms overhead
- π Zero-config Git hook integration
- π Multi-LLM support: OpenAI/Claude/Ollama/Azure
- β‘ Smart diff filtering with regex rules
- π Interactive message editing
cargo install aigcw
# Initialize git hook (run once)
aigcw install-hook
# Commit with AI (requires API key)
git add .
git commit # Auto-generates: feat(parser): add diff filtering logic
Create ~/.aigcw/config.toml
:
[core]
model = "gpt-4-turbo" # gpt-3.5-turbo/claude-3/ollama/azure
lang = "en" # en|zh|ja|es
[openai]
api_key = "${ENV_OPENAI_KEY}" # Env var substitution
[template]
style = "conventional" # conventional|angular|semantic
max_diff_lines = 200 # Truncate large diffs
Provider | Example Models | Required Env Vars |
---|---|---|
OpenAI | GPT-4/GPT-3.5 | OPENAI_API_KEY |
Anthropic | Claude 3 | ANTHROPIC_API_KEY |
Ollama | CodeLlama/Llama2 | OLLAMA_HOST (optional) |
Azure | GPT series | AZURE_OPENAI_ENDPOINT |
# Build
cargo build --release
# Install from local
cargo install --path .
MIT Β© 2025 aigcw