# 使用 Homebrew 安装 aicommit2

查看 aicommit2 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:aicommit2
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install aicommit2
```

  证据: local Homebrew formula metadata

## 软件包事实

- **软件包键:** brew:aicommit2
- **软件包管理器:** Homebrew
- **版本:** 2.9.0
- **来源摘要:** Reactive CLI that generates commit messages for Git and Jujutsu with AI
- **主页:** <https://github.com/tak-bro/aicommit2>
- **最后更新:** 2026-07-28T12:00:20Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- aic2 (别名)
- aicommit2 (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 2.9.0
## 项目历史与用法

aicommit2 is a Node-based command-line tool for generating commit messages and code-review text from version-control diffs. Its upstream README describes support for Git, YADM, and Jujutsu, plus cloud and local AI providers including OpenAI, Anthropic, Gemini, Mistral, Groq, Ollama, OpenRouter, and other OpenAI-compatible services.

### 项目历史

The project positions itself as a successor-style tool in the AI commit-message niche: the README explicitly says AICommits inspired its core functionality and architecture. The npm registry records the aicommit2 package as created in July 2023, while the current GitHub repository record dates the public repository to January 2024.

Later development emphasized provider breadth, reactive selection among generated messages, Jujutsu support, prepare-commit-msg hook usage, diff compression, and optional code review. The configuration documentation settled on an XDG-style INI file with a legacy dotfile fallback.

### 采用历史

Official install paths include npm, Homebrew, and Nix. The README advertises both npm and Homebrew badges, and the Homebrew formula describes it as a reactive CLI for Git and Jujutsu commit messages.

Homebrew analytics for the formula reported 1,842 installs over 365 days at the time checked, while the npm registry showed 155 published versions and latest version 2.6.1.

### 使用方式

Typical use is to stage changes and run `aicommit2`, or use the shorter `aic2` alias. Users configure at least one provider through `aicommit2 setup`, `aicommit2 config set`, environment variables, or a config file.

Package-manager users care about the config-path order because the same file can hold provider keys and model settings: `$AICOMMIT_CONFIG_PATH`, then XDG config, then `~/.aicommit2`.

### 为什么软件包爱好者会关心

aicommit2 is part of the post-ChatGPT wave of small, global CLI tools that wrap Git workflows with LLM calls. It is interesting beside aicommits because it shows a package evolving from single-purpose commit generation into a multi-provider, multi-VCS terminal assistant while still installing as one small executable.

### 时间线

- 2023: npm package record for aicommit2 created.
- 2024: Current GitHub repository created.
- 2026: Homebrew formula and npm package list version 2.6.1 as stable/latest.

### Related projects

- aicommits, cited by aicommit2 as inspiration.
- Git, YADM, and Jujutsu, the version-control systems aicommit2 targets.
- Ollama and OpenAI-compatible APIs, supported provider families.

### 来源

- <https://formulae.brew.sh/api/formula/aicommit2.json>
- <https://github.com/tak-bro/aicommit2>
- <https://github.com/tak-bro/aicommit2/blob/main/docs/settings.md>
- <https://registry.npmjs.org/aicommit2>


## 安全说明

没有找到 aicommit2 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。



## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: $AICOMMIT_CONFIG_PATH, $XDG_CONFIG_HOME/aicommit2/config.ini, ~/.config/aicommit2/config.ini, ~/.aicommit2

## Credential files

- Unix: $AICOMMIT_CONFIG_PATH, $XDG_CONFIG_HOME/aicommit2/config.ini, ~/.config/aicommit2/config.ini, ~/.aicommit2

## Combined YAML source

View the package source record on GitHub. [combined/aicommit2.yml](https://github.com/mxcl/pkgdb/blob/main/combined/aicommit2.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- cross-ecosystem install command graph
