承接 jesse-bos/openai-commit-messages 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jesse-bos/openai-commit-messages

Composer 安装命令:

composer require jesse-bos/openai-commit-messages

包简介

A Laravel package that generates AI-powered commit messages using OpenAI

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

OpenAI Commit Messages is a Laravel package that generates meaningful commit messages using OpenAI based on your git changes. It first checks for staged changes, and if none are found, analyzes unstaged changes. Just run one command and get a suggested commit message!

Installation

Step 1: Install the Package

composer require jesse-bos/openai-commit-messages --dev

This automatically installs the required OpenAI Laravel package as well.

Step 2: Publish OpenAI Configuration

php artisan vendor:publish --provider="OpenAI\Laravel\ServiceProvider"

Step 3: Add your OpenAI API Key

  1. Get an API key from OpenAI's website
  2. Add it to your .env file:
OPENAI_API_KEY=sk-your-actual-api-key-here

Step 4: Optionally configure the Package

If you want to customize the OpenAI model, publish the package config:

php artisan vendor:publish --tag="openai-commit-messages-config"

Prerequisites

  • PHP 8.3+
  • Laravel 11.0+ or 12.0+
  • OpenAI API key with sufficient credits

Usage

Verify your setup (recommended first time)

After installation, verify that everything is configured correctly by running the command. The package will automatically check:

  • ✓ OpenAI API key is set
  • ✓ OpenAI configuration is published
  • ✓ You're in a git repository
  • ✓ Model configuration

Generate commit messages

After making changes in your git repository, simply run:

php artisan openai:commit-message

The package will automatically:

  1. First check for staged changes (files added with git add or staged via Tower, GitHub Desktop, etc.)
  2. If no staged changes found, it will analyze unstaged changes
  3. Generate a commit message based on the found changes using OpenAI

The tool works seamlessly with any git workflow:

  • Command line: git add . then php artisan openai:commit-message
  • Tower/GitHub Desktop: Stage files in the GUI, then run php artisan openai:commit-message
  • Quick preview: Just run php artisan openai:commit-message to see a message for unstaged changes

After getting the suggested message, create your commit:

git commit -m "the suggested message"

Configuration

You can configure the package by publishing and editing the config file:

php artisan vendor:publish --tag="openai-commit-messages-config"

Available Configuration Options

return [
    'openai' => [
        // OpenAI model to use for generating commit messages
        'model' => env('OPENAI_COMMIT_MESSAGES_MODEL', 'gpt-4o-mini'),
    ],

    'commit' => [
        // Maximum length for the commit message
        'max_length' => 72,

        // Use conventional commit format (e.g. feat: message, fix: bug)
        'conventional' => true,
    ],
];

Environment Variables

You can also configure the OpenAI model using an environment variable:

OPENAI_COMMIT_MESSAGES_MODEL=gpt-4o

Testing

composer test

Credits

License

The MIT License (MIT). Please see License File for more information.

jesse-bos/openai-commit-messages 适用场景与选型建议

jesse-bos/openai-commit-messages 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 34 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 05 月 25 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「git」 「laravel」 「commit」 「ai」 「openai」 「Jesse Bos」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 jesse-bos/openai-commit-messages 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 jesse-bos/openai-commit-messages 我们能提供哪些服务?
定制开发 / 二次开发

基于 jesse-bos/openai-commit-messages 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 34
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 23
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-05-25