Skip to content

git-acm configuration guide

This guide explains how to configure and set up git-acm powered by OpenRouter.

Before configuring git-acm, ensure you have:

  • Git initialized in your project directory
  • An OpenRouter API key
  • A .env file in your project root (recommended) or environment variables set

git-acm uses OpenRouter as the model provider and supports many models under one API.

  1. Get your API key

  2. Configure environment variables

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

    .env
    OPENROUTER_API_KEY="your_openrouter_api_key"

After setting up the API key, fetch models and select one:

Terminal window
# fetch and cache models once
git-acm get-models
# list cached models
git-acm list
# copy model id from the list or from the OpenRouter models page
git-acm use <model_id>

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.

Once configured, simply run:

Terminal window
git-acm

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

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 a model using git-acm use
  4. Verify your internet connection

For bug reports or issues, contact me:

git-acm stores preferences and cached models in your OS config directory:

  • macOS: ~/Library/Application Support/git-acm
  • Linux: $XDG_CONFIG_HOME/git-acm
  • Windows: %APPDATA%/git-acm

Files created there:

  • git-acm-prefs.json — selected model id and autocommit preference
  • models.json — cached list of models from OpenRouter