AI Commits is a CLI tool that generates git commit messages automatically using AI.
The tool solves the friction of writing commit messages by analyzing staged changes and generating appropriate messages through an AI provider. It works by staging your changes normally, then running the CLI to have an AI model examine the diff and produce a commit message. The tool supports multiple AI providers including TogetherAI, OpenAI, Groq, xAI, OpenRouter, Ollama, and LM Studio, as well as custom OpenAI-compatible endpoints. Users can configure their preferred provider and API key during setup, and the tool offers multiple commit message formats including plain, conventional, conventional with body, gitmoji, and subject with body styles.
Developers should choose this tool if they want to eliminate the overhead of writing commit messages while maintaining consistency in message format across a project. It suits any workflow where developers stage changes frequently and want to speed up the commit process. The tool is particularly useful for teams that have adopted a specific commit message convention, since the format can be configured during setup. For CI/CD environments, configuration can be set via environment variables or a config file rather than interactive setup.
The project maintains active development with regular updates to support new AI providers and models. The tool automatically detects and fetches available models from supported providers during setup, reducing manual configuration. The codebase includes fallback logic for providers and models that do not support tool-based generation, ensuring compatibility across different AI services. The project provides both a direct CLI interface and an alias for convenience, and it automatically detects the user's package manager for seamless updates.