Generate AI-powered git commit messages automatically from staged changes. Supports Ollama (local) and GitHub Copilot.
Homebrew (macOS / Linux)
brew tap JulienQNN/tap
brew install comaiFrom Source
git clone https://github.com/JulienQNN/comai.git
cd comai && go build -o comai main.go && sudo mv comai /usr/local/bin/# 1. Configure comai (choose provider: Ollama or Copilot)
comai init
# 2. Stage your changes
git add .
# 3. Generate commit message
comai generate
# 4. Review, edit if needed, confirmInitialize with interactive setup. Choose provider, model, language, max length.
Flags:
--global, -g: Save to~/.comai.yamlinstead of.comai.yaml
Generate commit from staged changes.
Flags:
--global, -g: Use~/.comai.yaml--verbose, -v: Show config details--date "yesterday": Set custom commit date (natural language or ISO format)--date-interactive, -D: Choose date after generation
- Runs on your machine
- Requires Ollama installed and running
- Models:
qwen3.5:9b(recommended),qwen3.5:4b,mistral:7b, etc. - Setup:
ollama servein one terminal, thenollama pull qwen3.5:9b
- Uses GitHub Copilot API
- Requires GitHub CLI + Copilot subscription
Use comai init or edit .comai.yaml (local) or ~/.comai.yaml (global):
provider: ollama # or "copilot"
model: qwen3.5:9b # Provider-specific
language: en
commit_max_length: 50 # Characters
custom_instructions: "" # Optional: override system prompt- Intelligent filtering: Ignores lock files, binaries, auto-generated content
- Custom prompts: Override system message with your own instructions
- Date handling: Use natural language ("yesterday", "last week") or ISO format
- Streaming: Real-time token display while generating
- Editing: Review and edit generated message before committing
- Git: With configured
user.nameanduser.email - Copilot path: GitHub Copilot CLI + active subscription
See LICENSE | Contributing
