git-acm configuration guide
This guide explains how to configure and set up git-acm
powered by OpenRouter.
Prerequisites
Section titled âPrerequisitesâ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
Model provider
Section titled âModel providerâgit-acm
uses OpenRouter as the model provider and supports many models under one API.
Setting up API key
Section titled âSetting up API keyâ-
Get your API key
- Visit OpenRouter and create a key.
-
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"
Select a model
Section titled âSelect a modelâAfter setting up the API key, fetch models and select one:
# fetch and cache models oncegit-acm get-models
# list cached modelsgit-acm list
# copy model id from the list or from the OpenRouter models pagegit-acm use <model_id>
Auto-commit Configuration
Section titled â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
Section titled âUsage after configurationâOnce configured, simply run:
git-acm
This will generate a commit message using your selected API provider.
Troubleshooting
Section titled â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 a model using
git-acm use
- Verify your internet connection
Support
Section titled âSupportâFor bug reports or issues, contact me:
- twitter: @shivamhwp
Config storage
Section titled âConfig storageâ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 preferencemodels.json
â cached list of models from OpenRouter