← 全部工具

aicommit

热度 85 更新于 开发与构建

AI-powered commit message generator

homebrewauto-collected

安装

Homebrew
brew install aicommit

通过 Homebrew 安装。

aicommit

aicommit is a small command line tool for generating commit messages. There are many of these already out there, some even with the same name. But none (to my knowledge) follow the repository's existing style, making them useless when working in an established codebase.

A good commit message is more than a summary of the code changes. It contains the intention, context, and external references that help others understand the change. Thus, aicommit has a -c/--context flag for quickly adding this detail.

aicommit is inspired by our good friend @sreya:

Install

Via Homebrew:

brew install aicommit

Or, using Go:

go install github.com/coder/aicommit/cmd/aicommit@main

Or, download a binary from the latest release.

Usage

You can run aicommit with no arguments to generate a commit message for the staged changes.

export OPENAI_API_KEY="..."
aicommit

You can "retry" a commit message by using the -a/--amend flag.

aicommit -a

You can dry-run with -d/--dry to see the ideal message without committing.

aicommit -d

Or, you can point to a specific ref: