A powerful Command Line Interface (CLI) tool that leverages AI to generate meaningful and standardized Git commit messages. Commitah analyzes your staged changes and provides contextual commit message suggestions following conventional commit standards.
- 🤖 AI-Powered Messages: Generates commit messages by analyzing git diff using various AI providers
- 🎨 Interactive UI: User-friendly CLI interface for selecting commit messages
- ⚙️ Multiple AI Providers: Supports OpenAI, Gemini, DeepSeek, and Ollama
- 🔧 Configurable: Customize message specifications and provider settings
- 📝 Conventional Commits: Follows standardized commit message format
Commit selection v2 |
---|
![]() |
AI Provider on configuration v2 |
---|
![]() |
- Node.js v16 or later
- Git installed and available in PATH
- API key from your chosen AI provider (OpenAI, Gemini, DeepSeek) or Ollama running locally
npm install --global commitah
Basic usage:
# Stage your changes first
git add .
# Generate commit message
commitah
Available options:
# Show current configuration
commitah --config
# Update configuration
commitah --config-update
# Preview commit message without committing
commitah --show
Configuration is stored in ~/.commitahconfig-v2
. The tool will create a default configuration on first run.
You can update the configuration using the --config-update
option.
Example configuration:
{
"provider": "OpenAI",
"providerApiKey": "your-api-key",
"providerUrl": "https://api.openai.com/v1",
"messageSpec": "conventional commit",
"sizeOption": 3,
"model": "gpt-4-turbo-preview"
}
- OpenAI: Uses GPT models
- Gemini: Uses Google's Gemini models
- DeepSeek: Uses DeepSeek's language models
- Ollama: Uses locally hosted models
-
First, install Ollama on your system following the instructions at Ollama's official website
-
Pull the recommended models:
# Pull Qwen2.5 Coder
ollama pull qwen2.5-coder
# Pull Dolphin 3
ollama pull dolphin3
# Pull Gemma 2B
ollama pull gemma:2b
- Configure Commitah to use Ollama:
commitah --config-update
Then:
- Select 'Ollama' as the provider
- Enter your Ollama URL (default: http://localhost:11434)
- Select one of the recommended models:
- qwen2.5-coder (Recommended for best code understanding)
- dolphin3 (Good balance of speed and accuracy)
- gemma:2b (Lightweight option)
Note: Ensure Ollama is running before using Commitah with these models.
- Analyzes staged changes using
git diff
- Sends the diff to the configured AI provider
- Generates multiple commit message suggestions
- Presents an interactive UI to select the preferred message
- Creates the commit with the selected message
To build from source:
# Clone the repository
git clone [repository-url]
# Install dependencies
npm install
# Build the project
npm run build
ISC License
Muhammad Utsman