An AI-powered commit message generator that uses either OpenAI's GPT models or Ollama's local models to create meaningful git commit messages.
pip install commit-crafter-ai
Default client is OpenAI:
commit-crafter-ai craft
If you want to use Ollama with a specific model:
commit-crafter-ai craft --ollama 'model-name'
If you want to copy the commit message to clipboard instead of directly creating a commit:
commit-crafter-ai craft --copy
You can customize the commit message generation prompt by creating a craft.config
file in your project root directory. If no config file is found, the default prompt will be used.
This project is licensed under the MIT License - see the LICENSE file for details.
- Generates clear and concise commit messages
- Follows conventional commit format
- Provides detailed descriptions of changes
- Easy to use command-line interface
- Python 3.7+
- OpenAI API key
- Export your OpenAI API key:
# Linux/macOS
export OPENAI_API_KEY="your-api-key-here"
# Windows (Command Prompt)
set OPENAI_API_KEY=your-api-key-here
# Windows (PowerShell)
$env:OPENAI_API_KEY="your-api-key-here"
- The API key can also be added to your shell configuration file (~/.bashrc, ~/.zshrc, etc.) for persistence:
echo 'export OPENAI_API_KEY="your-api-key-here"' >> ~/.bashrc # or ~/.zshrc