AI Generated Commits
To install agcommits use the go install command:
go install github.com/feiandxs/agcommits@latestThen you can add agcommits binary to PATH environment variable in your ~/.bashrc or ~/.bash_profile file:
If you already have
agcommitsinstalled, updatingagcommitsis simple:
go get -u github.com/feiandxs/agcommits
agcommitsEnter your APIKEY and other information as prompted.
cd /path/to/your/projectagcommitsThen you can see the generated commit message in the terminal.
That's all.
AGCOMMITS supports both global and project-specific configurations:
- Global config:
~/.agcommitsrc.yaml - Project config:
.agcommits.yamlin your project root
For detailed configuration options, see .agcommits.yaml.example.
# Required fields
openai_key: "your-api-key"
openai_api_base: "https://api.siliconflow.cn"
openai_model: "Qwen/Qwen2.5-Coder-7B-Instruct"
# Optional fields
commit_locale: "en" # Language: zh (Chinese) or en (English)
max_length: 150 # Maximum commit message length
auto_add: false # Auto-execute git add
auto_commit: false # Auto-execute git commit