搜索插件、代码仓与 APP 分类

插件详情v0.0.1

ai_commit

使用 OpenAI 生成提交消息的 Dart 命令行工具

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
121
喜欢数
3
Pub 分数
120

安装插件

flutter pub add ai_commit

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

ai_commit 是一个 Dart 命令行工具,使用 OpenAI 的语言模型生成提交消息。它可无缝集成到开发工作流中,使开发者能够根据代码更改自动生成描述性强且有意义的提交消息。通过利用生成式 AI,它减少了编写提交所花费的时间,并提高了团队间的一致性。该工具支持多种平台,包括移动、Web 和桌面端,适用于跨平台项目。对于希望在版本控制实践中实现自动化的开发者来说,这是一个理想选择。

适合场景

  • 自动化提交消息生成
  • 改进提交消息质量
  • 简化团队协作
  • 减少 git 工作流中的手动输入
  • 提高代码审查的清晰度

主要特点

  • 生成由人工智能驱动的提交消息
  • 支持多个平台
  • 与 Flutter 和 Dart 项目集成
  • 使用 OpenAI 进行自然语言处理
  • 命令行界面,便于使用

适合对象

  • 使用 Git 的 Flutter 开发人员
  • 致力于保持一致提交信息的团队
  • CI/CD 流水线集成商
  • DevOps 工程师
  • 希望提高效率的个人贡献者

使用建议

  • 需要一个 OpenAI API 密钥
  • 依赖互联网连接
  • 在没有适当上下文的情况下,可能会生成不准确的消息
  • 不适合敏感代码环境
  • AI提示的自定义有限

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

ai_commit

pub package Last Commits GitHub repo size License
Uploaded By

Dart CLI for generated git commit messages with OpenAI.


Quick Started 🚀

Installing

dart pub global activate ai_commit

Or install a specific version using:

dart pub global activate ai_commit <version>

Commands

ai_commit -h

See the complete list of commands and usage information.

Dart CLI for generated commit messages with OpenAI.

Usage: ai_commit <command> [arguments]

Global options:
-h, --help                 Print this usage information.
-a, --all                  Automatically stage changes in tracked files for the commit
-c, --count                Count of messages to generate (Warning: generating multiple costs more)
-m, --model                Locale language for commit message.
-x, --exclude              Files to exclude from AI analysis
-l, --max-length           Set max length of commit message.
    --locale               Locale language for commit message.
    --[no-]conventional    Format the commit message according to the Conventional Commits specification.
-v, --version              Print the current version.
    --[no-]verbose         Noisy logging, including all shell commands executed.

Available commands:
  config   ai_commit configuration
  update   Update the CLI.

Run "ai_commit help <command>" for more information about a command.
ai_commit config

Save data configuration and use later.

ai_commit configuration

Usage: ai_commit config [arguments]
-h, --help                 Print this usage information.
    --key                  OpenAI API key.
    --locale               Set locale language.
    --count                Generate commit message count.
    --[no-]conventional    Format the commit message according to the Conventional Commits specification.
    --model                Set model name for OpenAI API.
    --max-length           Set max length of commit message.

Run "ai_commit help" to see global options.

Usage

Before using you need to set OpenAI API key

ai_commit config --key sk-xxx

Generate commit message

ai_commit

Add all files and generate a commit message

ai_commit -a

Count of messages to generate (Warning: generating multiple costs more)

# one time use
ai_commit -c 2

# save data to config
ai_commit config -c 2

OpenAI model to use for generation

# one time use
ai_commit -m gpt-3.5-turbo-1106

# save data to config
ai_commit config -m gpt-3.5-turbo-1106

Files to exclude from AI analysis

# single
ai_commit -x test.dart

# multiple
ai_commit -x one.dart, two.dart

Max length of commit message

# one time use
ai_commit -l 200

# save data to config
ai_commit config -l 200

Locale language for commit message

# one time use
ai_commit --locale en

# save data to config
ai_commit config --locale en

Format the commit message according to the Conventional Commits specification.

# one time use
ai_commit --conventional

# save data to config
ai_commit config --conventional

Disable Conventional Commits Format

ai_commit --no-conventional

# save data to config
ai_commit config --no-conventional

所属分类

依赖

依赖清单 7 项

源码仓库

使用此插件的项目

暂无相关数据。