x-cmd icon indicating copy to clipboard operation
x-cmd copied to clipboard

[REC] 自动提交规范的git commit的小工具

Open newdee opened this issue 11 months ago • 0 comments

🔗 Website

https://github.com/newdee/git-commit-helper

📦 Ready to be included in x-cmd pkg ?

YES

📥 How to install

cargo install git-commit-helper

📝 TLDR

Set OPENAI_BASE_URL(Optional),OPENAI_API_KEY(Required) in your environment.
Use this command after your git add command.
Usage: git-commit-helper [OPTIONS]

Options:
  -m, --model <MODEL>          [default: gpt-4o]
      --max-token <MAX_TOKEN>  [default: 2048]
  -h, --help                   Print help
  -V, --version                Print version

👀 Preview

asciicast

🌟 Highlights

  • 智能生成提交信息 利用大语言模型(LLM)分析 Git 变更内容,自动生成语义清晰、有意义的提交信息,降低人工编写负担。

  • 提升开发效率 避免“fix typo”、“update code”等无效信息,提高提交历史的可读性和可维护性。

  • 友好的命令行交互 提供简洁直观的 CLI 体验,轻松集成到日常开发流程中。

  • 缓解命名困难症 对于不擅长写英文 commit 的开发者非常友好,有效解决“写什么好”的常见烦恼。

  • 可无缝集成到 LazyGit 通过配置自定义命令,与 LazyGit 配合使用,实现一键生成并提交消息,进一步提升工作效率。

newdee avatar May 14 '25 12:05 newdee