PHPackages                             mabdulmonem/ai-commits - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mabdulmonem/ai-commits

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mabdulmonem/ai-commits
======================

AI-powered Git commit assistant for Laravel

09PHP

Since May 23Pushed 1y agoCompare

[ Source](https://github.com/m-abdulmonem/ai-commits)[ Packagist](https://packagist.org/packages/mabdulmonem/ai-commits)[ RSS](/packages/mabdulmonem-ai-commits/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

AI Commits for Laravel
======================

[](#ai-commits-for-laravel)

[![Latest Version](https://camo.githubusercontent.com/3fae1eb280145511579b37530bb3782170b36216d9c5629f3a462a7bc94f9951/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d616264756c6d6f6e656d2f61692d636f6d6d6974732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mabdulmonem/ai-commits)[![Tests](https://github.com/mabdulmonem/ai-commits/actions/workflows/tests.yml/badge.svg)](https://github.com/mabdulmonem/ai-commits/actions)[![License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/13c5455090b1b290f5fb4d2dc1e48f0a355b6d746a729a773a12dc3e740a1c55/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d616264756c6d6f6e656d2f61692d636f6d6d6974732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mabdulmonem/ai-commits)

An intelligent Git commit assistant that automatically generates meaningful, conventional commit messages using AI based on your code changes.

Features
--------

[](#features)

- 🧠 **Multi-AI Support** - Works with OpenAI, OpenRouter, and Anthropic Claude
- 📝 **Conventional Commits** - Generates properly formatted commit messages
- 🔍 **Smart Diff Analysis** - Understands code changes at hunk level
- 🚀 **VCS Integration** - GitHub, GitLab, and Bitbucket support
- ⚡ **Auto-Repo Setup** - Initializes Git repos and configures remotes
- 🔧 **Extensible Architecture** - Easy to add new AI/VCS providers
- 🛡️ **Error Resilient** - Graceful fallbacks and validations

Installation
------------

[](#installation)

Install via Composer:

```
composer require --dev mabdulmonem/ai-commits:dev-main
```

Publish the configuration file:

```
php artisan vendor:publish --tag=ai-commits-config
```

Configuration
-------------

[](#configuration)

Add your API keys to .env:

```
# AI Providers
OPENAI_API_KEY=your-openai-key
OPENROUTER_API_KEY=your-openrouter-key
ANTHROPIC_API_KEY=your-anthropic-key

# VCS Providers
GITHUB_TOKEN=your-github-token
GITLAB_TOKEN=your-gitlab-token
BITBUCKET_USERNAME=your-bitbucket-username
BITBUCKET_APP_PASSWORD=your-bitbucket-app-password
```

Usage
-----

[](#usage)

### Basic Command

[](#basic-command)

```
php artisan commit
```

### Command Options

[](#command-options)

OptionDescriptionExample--pushPush after committing--push--model=Specify AI model--model=gpt-4--provider=Specify AI provider--provider=openai--vcs=Specify VCS provider--vcs=github--dry-runShow what would happen--dry-run--no-aiSkip AI and use simple messages--no-ai--autoNon-interactive mode--auto### Advanced Examples

[](#advanced-examples)

Create and push with specific model:

```
php artisan commit --push --model=claude-2
```

Dry run with OpenRouter:

```
php artisan commit --dry-run --provider=openrouter
```

Initialize new repo and connect to GitHub:

```
php artisan commit --auto --vcs=github
```

Workflow Integration
--------------------

[](#workflow-integration)

### As a Git Hook

[](#as-a-git-hook)

Add to `.git/hooks/pre-commit`:

```
#!/bin/sh
php artisan commit --auto
```

### In CI/CD Pipelines

[](#in-cicd-pipelines)

Example GitHub Action step:

```
- name: AI Commit
  run: php artisan commit --auto --no-ai
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```

Supported AI Models
-------------------

[](#supported-ai-models)

ProviderSupported ModelsOpenAIgpt-3.5-turbo, gpt-4, etc.OpenRouter100+ models across providersAnthropicclaude-2, claude-instantSupported VCS Features
----------------------

[](#supported-vcs-features)

PlatformRepositoryPull RequestsAuth MethodsGitHub✅✅TokenGitLab✅✅TokenBitbucket✅✅App PasswordTesting
-------

[](#testing)

Run the test suite:

```
composer test
```

Generate test coverage:

```
composer test-coverage
```

Security
--------

[](#security)

If you discover any security issues, please email  instead of using the issue tracker.

Contributing
------------

[](#contributing)

1. Fork the project
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

Changelog
---------

[](#changelog)

See `CHANGELOG.md` for recent changes.

License
-------

[](#license)

The MIT License (MIT). See `LICENSE.md` for more information.

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/24464110?v=4)[Mohamed Abdel Al-Monem](/maintainers/mabdulmonem)[@mabdulmonem](https://github.com/mabdulmonem)

---

Top Contributors

[![mabdulmonem](https://avatars.githubusercontent.com/u/24464110?v=4)](https://github.com/mabdulmonem "mabdulmonem (21 commits)")

### Embed Badge

![Health badge](/badges/mabdulmonem-ai-commits/health.svg)

```
[![Health](https://phpackages.com/badges/mabdulmonem-ai-commits/health.svg)](https://phpackages.com/packages/mabdulmonem-ai-commits)
```

###  Alternatives

[symfony/dom-crawler

Eases DOM navigation for HTML and XML documents

4.1k399.9M2.6k](/packages/symfony-dom-crawler)[valentinek/yii2-closure-table-behavior

This extension allows you to get functional for closure table trees.

1615.5k](/packages/valentinek-yii2-closure-table-behavior)[rafwell/laravel-simplegrid

A simple component for generating powerful grids with Laravel.

362.9k](/packages/rafwell-laravel-simplegrid)[jorgejavierleon/laravelpnotify

Laravel 5 implementation for flash messages with Pnotify

1117.3k1](/packages/jorgejavierleon-laravelpnotify)[kbs1/laravel-abbreviations

Abbreviations / acronyms support for your app.

1019.2k](/packages/kbs1-laravel-abbreviations)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
