salehhashemi/laravel-intelli-git
| Install | |
|---|---|
composer require salehhashemi/laravel-intelli-git |
|
| Latest Version: | v0.1.0 |
| PHP: | ^8.1 |
| License: | MIT |
| Last Updated: | May 21, 2023 |
| Links: | GitHub · Packagist |
Laravel IntelliGit
An intelligent Laravel package to generate git commit messages using OpenAI.

Features
The following commands are implemented in this package:
ai:commit- Generate a commit message and description using AI
Stay tuned for future updates as we continue to expand the capabilities of the Laravel Intelli Git package.
Installation
-
Install the package via composer:
composer require salehhashemi/laravel-intelli-git -
Publish the configuration file:
php artisan vendor:publish --provider="Salehhashemi\LaravelIntelliGit\LaravelIntelliGitServiceProvider" -
Add your OpenAI API key to the
.envfile:OPEN_AI_KEY=your_openai_key -
Optionally, you can change the default model used by OpenAI in the
.envfile:OPEN_AI_MODEL=gpt-4
Usage
ai:commit
php artisan ai:commit
This command will automatically check for staged and unstaged changes in your git repository. If unstaged changes are found, it will ask you to stage them. Then, it will generate a commit message and description using OpenAI.
Examples
ai:commit
Here's an example of the command in action:
$ php artisan ai:commit
No staged changes found.
There are unstaged changes. Would you like to stage all changes? (yes/no) [no]:
> yes
All changes have been staged.
Generating commit message with AI, please wait...
Here are the AI-generated commit title and description:
Title
Refactor User model and improve validation
Description
This commit refactors the User model, specifically improving the validation logic by adding custom validation rules. It also includes updates to the relevant tests.
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.
Related Packages
Automagically generate conventional git commit message with AI. - 使用 AI 自动生...
A beautiful AI chat widget plugin for Filament v3 with OpenAI integration
AI API cost monitoring and key management plugin for Filament