CommitAI is a professional Command Line Interface (CLI) designed to automate and standardize your development workflow using Artificial Intelligence. It analyzes your changes and generates high-quality commit messages and Pull Request descriptions, following industry standards like Conventional Commits.
- Modern Interface: Premium terminal experience built with
@clack/prompts, featuring continuous visual flows and vertical indicators. - Project Awareness: Configure your Project Stack/Context (e.g., "React frontend with Tailwind") to help the AI provide more accurate and technically relevant descriptions.
- Dynamic PR Templates: Interactively select which sections to include in your Pull Request (What, Why, How to Test, Screenshots) on every run.
- Standardized Commits: Generates messages based on your
git diff --stagedusing the Conventional Commits pattern. - Commit Mentor: Suggests splitting large diffs into smaller, atomic commits for a cleaner project history.
- Multi-Provider Support: Choose between OpenAI, Anthropic (Claude), Google Gemini, DeepSeek, or local models via Ollama.
- Global Localization: Fully localized interface available in English, Portuguese, and Spanish.
- Browser Integration: Automatically opens PR creation pages on GitHub/GitLab with title and body pre-filled.
- Interactive Editing: Seamlessly integrates with your default terminal editor for manual fine-tuning.
Install globally via NPM:
npm install -g @ericgenovez/commitainpx @ericgenovez/commitai commitConfigure your AI provider, API Key, and Project Context:
commitai initStage your changes (git add .) and run:
commitai commitThe tool will present a suggestion. You can accept, edit in your terminal editor, or regenerate it.
To generate a comprehensive PR description and open it in your browser:
commitai prFollow the prompts to select the target branch and the desired sections.
Manage all settings through a modern, interactive menu:
commitai config- 🤖 Configure AI Provider: Sequentially set up Provider, Model, and API Key.
- 📁 Project Context: Define your technology stack to improve AI precision.
- 🌐 Change CLI Language: Instantly switch the interface language.
- Adjust other settings: Fine-tune emoji usage, commit styles, and line limits.
CommitAI supports local execution for privacy and cost savings:
- Install Ollama.
- Pull your preferred model (e.g.,
ollama pull llama3). - Run
commitai init, select Ollama, and enterllama3as the model.
# Install dependencies
npm install
# Build for production
npm run build
# Link globally for testing
npm linkThis project is licensed under the MIT License. See the LICENSE file for details.