Skip to content

Latest commit

 

History

History
92 lines (67 loc) · 2.85 KB

README.md

File metadata and controls

92 lines (67 loc) · 2.85 KB

English | 中文

AI Commit (aicmt)

An AI-powered Git commit assistant that not only generates commit messages, but also automatically analyzes and splits your code changes into multiple well-organized commits following best practices.

aicmt

Features

  • Analyzes code changes and splits them into logical commits
  • Generates descriptive commit messages for each split
  • Allows specifying number of commits or letting AI decide
  • Works with any git repository

Installation

Use pip to install (Python >=3.10)

pip install aicmt

or use brew to install

brew install versun/tap/aicmt

Quick Start

  1. Create configuration file .aicmtrc

Reference the template file .aicmtrc.template and create .aicmtrc in your home directory.

cp .aicmtrc.template ~/.config/aicmt/.aicmtrc

You can also create .aicmtrc in the current directory, which will override the global configuration file (~/.config/aicmt/.aicmtrc)

cd /path/to/git/repo
touch .aicmtrc
  1. Add OpenAI API and other information in the configuration file.

  2. Enter your git repository directory and run the aicmt command to automatically analyze changes and generate commit messages.

Help

$ aicmt -h
usage: aicmt [-h] [-v] [-n N]

<<< AICMT (AI Commit) - AI-powered Git commit assistant >>>

options:
  -h, --help           show this help message and exit
  -v, --version        show program's version number and exit
  -n, --num-commits N  Number of commits to generate (default: AI decides)

Development

  1. Clone the repository:
git clone https://github.com/versun/aicmt.git
  1. Install dependencies:
cd aicmt
pip install -e ".[dev]"

Having Issues?

All code in this project is AI-generated, so if you encounter any problems, please first try asking AI for solutions (preferably using the claude-3.5-sonnet model). If the issue persists, please submit an issue, and I will consult AI to resolve it.

Contributing

Pull requests are welcome! Please submit an issue before submitting a pull request, to avoid duplicate submissions.

A Big Thank You to My Sponsors

I am deeply grateful to my amazing supporters and sponsors who have made my open source journey possible.

Become a Sponser on Github / 爱发电 / 微信

Star History

Star History Chart