AI Commit is a powerful tool that generates Git commit messages using AI, supporting various models and providers. Integrate with LazyGit and VS Code, making it easy to incorporate AI-generated commit messages into your workflow.
- 🤖 Generate commit messages using AI
- 🔄 Support for multiple AI providers (OpenAI, Anthropic, OpenRouter, Groq, and OpenAI-compatible)
- 🖥️ CLI tool for easy integration into your workflow
- 📝 VS Code extension for seamless integration within the editor
- 🔗 LazyGit integration for streamlined Git operations
bun add -g @kkidd/aicommit
The VS Code extension is available in the marketplace: AI Commit - Generate Commit Messages
# Generate commit messages
aic generate [--amount <number>]
# Configure AI provider and model
aic config [options]
# View current configuration
aic view-config
# Set up integrations
aic integrate
- For initial setup or to update all settings, run
aic config
without options --provider
: AI provider (openai, openai-compatible, anthropic, openrouter, groq)--model
: AI model to use--api-key
: API key for the selected provider--endpoint
: Endpoint for OpenAI compatible providers--tokens
: Maximum number of tokens to generate--integration
: Integration to use (lazygit / vscode / none)
To set up the LazyGit integration:
- Run
aic integrate
- Choose "LazyGit" from the options
- Follow the prompts to configure your LazyGit config file
To set up the VS Code integration:
- Install the AI Commit extension from the VS Code marketplace
- Configure the extension settings in VS Code:
- AI provider
- API key
- Model
- Max tokens
- Number of commit messages to generate
- Endpoint (for other OpenAI compatible provider)
AI Commit uses a configuration file to store your preferences. You can edit this file directly or use the aic config
command to update your settings.
Example configuration:
{
"provider": "openai",
"model": "gpt-4",
"apiKey": "your-api-key-here",
"maxTokens": 256,
"integration": "lazygit",
"endpoint": "https://example.com/v1/"
}
- CLI tool for generating commit messages
- Support for multiple AI providers
- LazyGit integration
- VS Code Extension
- Custom prompt template
- Support for custom non-OpenAI compatible providers
- Localization support for multiple languages
- Integration with other Git GUI clients
To set up the development environment:
- Clone the repository
- Install dependencies:
bun install
- Build the project:
bun run build
- Run tests:
bun test
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/CoolFeature
) - Commit your changes (
git commit -m 'Add some CoolFeature'
) - Push to the branch (
git push origin feature/CoolFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any problems or have any questions, please open an issue on the GitHub repository.
- OpenAI for providing the OpenAI SDK
- Anthropic for their client SDK
- OpenRouter for additional AI model access
- Groq for their client SDK