Skip to content

Latest commit

 

History

History
159 lines (118 loc) · 3.54 KB

README_en.md

File metadata and controls

159 lines (118 loc) · 3.54 KB

AI Commit

English | 简体中文

An AI-powered Git commit message generator that supports multiple AI providers (Qwen, OpenAI, DeepSeek) and automatically generates commit messages compliant with the Conventional Commits specification.

Features

  • Automatically generate standardized Git commit messages
  • Support for multiple AI providers:
    • Qwen (Tongyi Qianwen)
    • OpenAI (GPT-4)
    • DeepSeek
  • Follow the Conventional Commits specification
  • Multi-language support (English, Simplified Chinese, Traditional Chinese)
  • Beautiful command-line interface
  • Interactive commit confirmation

Commit Message Format

Generated commit messages strictly follow this format:

<type>(<scope>): <subject>

<body>

<footer>

Supported commit types:

  • feat: New feature
  • fix: Bug fix
  • refactor: Code refactoring
  • docs: Documentation changes
  • style: Code style changes
  • test: Testing related changes
  • chore: Other updates

Installation

Quick Installation (Recommended)

Linux/macOS

curl -fsSL https://raw.githubusercontent.com/SimonGino/aicommit/main/scripts/install.sh | sudo bash

Windows (Run PowerShell as Administrator)

iwr -useb https://raw.githubusercontent.com/SimonGino/aicommit/main/scripts/install.ps1 | iex

Manual Installation

  1. Download the latest release package:

    • Visit the Releases page
    • Download the version suitable for your system
  2. Extract and install:

# Linux/macOS
tar xzf aicommit_*.tar.gz
sudo mv aicommit /usr/local/bin/
chmod +x /usr/local/bin/aicommit

# Windows
# Extract the zip file and add aicommit.exe to your system PATH

Configuration

Configure AI provider API keys before first use:

# Configure Qwen API
aicommit config --provider qwen --api-key your-api-key-here

# Configure OpenAI API
aicommit config --provider openai --api-key your-api-key-here

# Configure DeepSeek API
aicommit config --provider deepseek --api-key your-api-key-here

Set output language (optional):

aicommit config --language zh-CN  # Simplified Chinese (default)
aicommit config --language en     # English
aicommit config --language zh-TW  # Traditional Chinese

Usage

  1. Stage the changes you want to commit:
git add .  # or specify files
  1. Generate a commit message:
aicommit  # use default AI provider

Specify an AI provider:

aicommit --provider qwen     # use Qwen
aicommit --provider openai   # use OpenAI
aicommit --provider deepseek # use DeepSeek

Use a custom commit message:

aicommit -m "feat(auth): add user authentication"

Temporarily specify output language:

aicommit -l en     # Generate commit message in English
aicommit -l zh-CN  # Generate commit message in Simplified Chinese
aicommit -l zh-TW  # Generate commit message in Traditional Chinese
aicommit -l zh     # Generate commit message in Simplified Chinese (shorthand)

Uninstallation

# Linux/macOS
sudo bash -c "$(curl -fsSL https://raw.githubusercontent.com/SimonGino/aicommit/main/scripts/uninstall.sh)"

# Windows (Run PowerShell as Administrator)
iwr -useb https://raw.githubusercontent.com/SimonGino/aicommit/main/scripts/uninstall.ps1 | iex

Development

  1. Clone the repository:
git clone https://github.com/SimonGino/aicommit.git
cd aicommit
  1. Install dependencies:
go mod download
  1. Run tests:
go test ./...

Contributing

Pull requests and issues are welcome!

License

MIT