Skip to content

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

Available APIs

git-acm supports multiple models:

  • claude sonnet 4
  • claude opus 4
  • o1
  • gpt-4o
  • gpt-4.1
  • o1-pro
  • gpt-4.1-mini
  • gpt-4.1-nano
  • claude-3.7-sonnet
  • claude-3.5-sonnet
  • claude-3.5-haiku
  • gemini-2.5-pro
  • gemini-2.0-flash
  • gemini-2.0-flash-lite
  • deepseek-chat
  • deepseek-reasoner
  • llama-4-scout
  • llama-4-maverick
  • llama-3.3-70b-instruct
  • llama-3.1-8b-instruct
  • llama-3.1-70b-instruct
  • llama-3.2-3b-instruct

Setting Up API Keys

  1. Get Your API Keys

  2. Configure Environment Variables

    Add the following to your project’s .env file or export them in your terminal:

    .env
    # Gemini Configuration
    GEMINI_API_KEY="your-gemini-api-key"
    # Anthropic Configuration
    ANTHROPIC_API_KEY="your-anthropic-api-key"
    # OpenAI Configuration
    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 api
    DEEPSEEEK_API_KEY=""

Selecting an API Provider

after setting up the api keys, select the model you want to use:

Terminal window
git-acm use <model_name>

Replace <model_name> with one of:

- claude sonnet 4
- claude opus 4
- o1
- gpt-4o
- gpt-4.1
- o1-pro
- gpt-4.1-mini
- gpt-4.1-nano
- claude-3.7-sonnet
- claude-3.5-sonnet
- claude-3.5-haiku
- gemini-2.5-pro
- gemini-2.0-flash
- gemini-2.0-flash-lite
- deepseek-chat
- deepseek-reasoner
- llama-4-scout
- llama-4-maverick
- llama-3.3-70b-instruct
- llama-3.1-8b-instruct
- llama-3.1-70b-instruct
- llama-3.2-3b-instruct

Auto-commit Configuration

git-acm includes an auto-commit feature that can be enabled or disabled:

Terminal window
# Enable auto-commit
git-acm autocommit enable
# Disable auto-commit
git-acm autocommit disable

When enabled, git-acm will automatically commit changes with the generated message.

Usage After Configuration

Once configured, simply run:

Terminal window
git-acm

This will generate a commit message using your selected API provider.

Troubleshooting

If you encounter issues:

  1. Verify your API keys are correctly set in the .env file
  2. Ensure Git is initialized in your project directory
  3. Check that you’ve selected an modelusing git-acm use
  4. For Llama, ensure Ollama is running locally
  5. Verify your internet connection for cloud API providers

Support

For bug reports or issues, contact me: