commito v1.0.2
π AI-Powered Commit Message Generator (commito)
π Overview
commito is an AI-powered CLI tool that automatically generates meaningful commit messages by analyzing your staged Git changes. It supports Google Gemini, OpenAI's ChatGPT (GPT-4), and Anthropic Claude, allowing developers to create clear, structured, and context-aware commit messages effortlessly.
π― Key Features
β
Multi-Model Support β Choose from Gemini, ChatGPT, or Claude AI models.
β
Automatic Git Staging β Runs git add .
before generating a commit message.
β
Smart AI Analysis β Extracts meaningful changes from code diffs.
β
Interactive Commit Selection β Allows users to approve, regenerate, or modify suggestions.
β
Error Handling & Debugging β Provides clear logs and API failure handling.
β
User-Friendly Setup β Works with both technical and non-technical users.
β
Secure & Configurable β API key management for privacy and customization.
β
Global Language Support β AI understands multiple languages for international teams π.
π₯ Installation & Setup
πΉ Prerequisites
- Git installed (
git --version
to check). - Node.js (v14 or later) installed (
node -v
to check).
πΉ Install the Package
npm install -g commito
πΉ Configure API Key & AI Model
To use AI-generated commit messages, set up your preferred AI model:
commito setup
You'll be prompted to enter:
1. Your AI API Key (Google Gemini, OpenAI, or Claude)
2. The AI model you want to use (gemini
, chatgpt
, or claude
)
π How to Use
πΉ 1. Stage Your Code (Automatically Handled)
You donβt need to run git add .
manuallyβcommito does it for you!
πΉ 2. Generate Commit Message
commito generate
πΉ 3. Select & Confirm Your Commit Message
You'll see AI-generated commit messages with options:
- Approve β β Uses the generated commit message.
- Regenerate π β Asks AI for a new suggestion.
- Cancel β β Exits without committing.
πΉ 4. Use in Git Commit
git commit -m "$(commito generate)"
This directly applies the AI-generated commit message!
π₯ Why Use This Over Manual Commit Messages?
Feature | Traditional Commit Messages | AI-Powered Smart Commit |
---|---|---|
Time Efficiency | Takes minutes to think | Instantly generates π |
Standardization | Inconsistent formatting | Follows best practices |
Code Awareness | Requires manual analysis | AI understands context |
Multi-Language | English only (mostly) | Supports multiple languages π |
Ideal for: Developers, teams, and open-source contributors who want faster, clearer commit messages!
π Configuration & Customization
πΉ Update API Key or Model
commito setup
You can reconfigure at any time!
πΉ Check Current Configuration
cat ~/.commitorc
π Troubleshooting
β AI Not Generating Messages?
β
Ensure your API key is correctly set up (commito setup
).
β
Check for API rate limits (commito debug
).
β
Verify that your staged files contain actual code changes (git diff --cached
).
β Command Not Found?
Run:
npm link
This will properly register the CLI tool.
π Future Enhancements
πΉ AI Confidence Score β Show AI-generated message confidence levels.
πΉ Integration with GitHub & GitLab β Auto-comment AI commits on PRs.
πΉ Support for Conventional Commits β Enforce structured commit formats.
πΉ Voice-to-Commit Feature β Dictate commit messages via speech recognition.
π€ Contribute & Support
Found a bug or have a feature request? Open an issue at: π GitHub Repository
πΉ How to Contribute
We welcome contributions from everyone! Here's how you can get involved: 1. Fork the repository to your GitHub account. 2. Clone your forked repo and make the changes you want. 3. Create a Pull Request (PR) with a clear description of your changes. 4. Follow our coding standards and ensure your code passes the linting tests.
We review all PRs and are happy to help you through the process.
πΉ How You Can Improve commito
- Refactor code for better performance.
- Add support for additional Git features (e.g., Git hooks, custom commit templates).
- Enhance AI models or implement new models for better accuracy and versatility.
- Improve error handling to ensure the tool works smoothly in all environments.
- Support for more languages to help global developers.
πΈ Buy Me a Coffee β
If you enjoy using commito and want to support its continued development, consider buying me a coffee! It helps fund new features, bug fixes, and keep the project alive.
π Buy Me a Coffee
π License
MIT License Β© 2024 Ankit
π¬ Contact
πΌ Ankit β Software Development Engineer
π§ private.ankit047@gmail.com
π LinkedIn: imankii01
π GitHub: imankii01