git-acm configuration guide
This guide explains how to configure and set up the git-acm tool for generating AI-powered commit messages.
Prerequisites
Before configuring git-acm, ensure you have:
- Git initialized in your project directory
- At least one of the supported AI API keys
- A
.env
file in your project root (recommended) or environment variables set
API Configuration
Available APIs
git-acm supports multiple AI providers:
- Gemini (Google)
- OpenAI (gpt-4o)
- Anthropic (Claude)
- Llama (via Ollama)
- deepseek new
Setting Up API Keys
-
Get Your API Keys
- gemini: Visit google AI Studio
- openai: Visit openai Platform
- anthropic: Visit anthropic console
- llama: use ollama
- deepseek: visit deepseek
-
Configure Environment Variables
Add the following to your project’s
.env
file or export them in your terminal:.env # Gemini ConfigurationGEMINI_API_URL="https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash:generateContent"GEMINI_API_KEY="your-gemini-api-key"# Anthropic ConfigurationANTHROPIC_API_URL="https://api.anthropic.com/v1/messages"ANTHROPIC_API_KEY="your-anthropic-api-key"# OpenAI ConfigurationOPENAI_API_URL="https://api.openai.com/v1/chat/completions"OPENAI_API_KEY="your-openai-api-key"# Llama Configuration (using Ollama)LLAMA_API_URL="http://localhost:11434/api/generate"LLAMA_MODEL_NAME="llama3.2:1b"# for deepseek apiDEEPSEEEK_API_URL="https://api.deepseek.com/chat/completions"DEEPSEEEK_API_KEY=""
Selecting an API Provider
After setting up your API keys, choose which provider to use:
git-acm use <api_name>
Replace <api_name>
with one of:
gemini
openai
anthropic
llama
deepseek
Auto-commit Configuration
git-acm includes an auto-commit feature that can be enabled or disabled:
# Enable auto-commitgit-acm autocommit enable
# Disable auto-commitgit-acm autocommit disable
When enabled, git-acm will automatically commit changes with the generated message.
Usage After Configuration
Once configured, simply run:
git-acm
This will generate a commit message using your selected API provider.
Troubleshooting
If you encounter issues:
- Verify your API keys are correctly set in the
.env
file - Ensure Git is initialized in your project directory
- Check that you’ve selected an API provider using
git-acm use
- For Llama, ensure Ollama is running locally
- Verify your internet connection for cloud API providers
Support
For bug reports or issues, contact me:
- twitter: @shivamhwp