Scripts2026年4月1日·1 分钟阅读

OpenCommit — AI-Powered Git Commit Messages

OpenCommit auto-generates meaningful git commit messages using AI. 7.2K+ stars. Claude, GPT, Ollama, git hook integration. Open source.

SC
Script Depot · Community
快速使用

先拿来用,再决定要不要深挖

这里应该同时让用户和 Agent 知道第一步该复制什么、安装什么、落到哪里。

# Install
npm install -g opencommit

# Configure
oco config set OCO_API_KEY=<your_key>

# Use — stage changes, then run
git add .
oco
# Generates commit message in 1 second!

# Or as git hook (auto-run on commit)
oco hook set

介绍

OpenCommit is a GPT-powered CLI tool that auto-generates meaningful git commit messages in seconds. With 7,200+ GitHub stars, it supports OpenAI, Anthropic Claude, Azure, Gemini, and local Ollama models. Features one-second commit generation, git hook integration for seamless IDE workflows, GitHub Actions support, customizable emoji, language, and commit style, and the ability to run entirely locally with Ollama. Winner of GitHub 2023 hackathon.

Best for: Developers who want consistent, descriptive commit messages without the effort Works with: Claude Code, OpenAI Codex, Cursor, Gemini CLI, Windsurf


Key Features

  • One-second commit message generation
  • Multi-provider: OpenAI, Claude, Gemini, Ollama
  • Git hook integration for automatic messages
  • GitHub Actions support (beta)
  • Customizable style, language, emojis
  • Local models via Ollama (no API cost)

FAQ

Q: What is OpenCommit? A: AI commit message generator with 7.2K+ stars. Run oco after git add for instant messages. Claude, GPT, Ollama support.

Q: How do I install OpenCommit? A: npm install -g opencommit. oco config set OCO_API_KEY=key. Then git add . && oco.


🙏

来源与感谢

di-sukharev/opencommit — 7,200+ GitHub stars

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产