A JetBrains IDE plugin that generates git commit messages from your diff using a configurable LLM backend.
appleboy/CodeGPT
A Go CLI that generates git commit messages and brief code reviews with LLMs, and can install a prepare-commit-msg git hook.
- Stars
- 1,504
- Forks
- 132
- Open issues
- 10
- Last commit
- last month
What is it?
CodeGPT is a command-line tool written in Go that drafts git commit messages from your staged changes and produces brief code review summaries. It can run directly as a `codegpt commit` or `codegpt review` command, or be installed as a prepare-commit-msg git hook so the generated message appears in your editor when you commit.
The default backend is the OpenAI API, with a configurable model such as gpt-4o. The project also supports Azure OpenAI, Gemini (Gemini API and VertexAI), Anthropic, Groq, Ollama, OpenRouter, and LiteLLM proxies. API keys can be stored in the OS keyring or fetched dynamically through a helper command, such as a password manager or cloud secret service.
Output can follow the Conventional Commits format and be translated into English, Traditional Chinese, Simplified Chinese, or Japanese. Commit message templates, custom template variables, streaming output, diff context lines, file exclusion patterns, and SOCKS or HTTP proxies are also configurable.
Key features
- 01Generates commit messages from staged git changes, following the Conventional Commits format.
- 02Installs and uninstalls a prepare-commit-msg git hook with a single command.
- 03Produces brief code review summaries for staged changes.
- 04Supports OpenAI, Azure OpenAI, Gemini, Anthropic, Groq, Ollama, OpenRouter, and LiteLLM.
- 05Translates generated messages into several languages, including Chinese and Japanese.
- 06Supports customizable commit message templates and prompt templates.
Use cases
- Writing clear commit messages for changes without spending time on wording.
- Getting a quick second look at staged changes before opening a pull request.
- Running commit message generation against a local model through Ollama.
- Standardizing commit history across a team with a shared template.
Quick start
- 1
Add the Homebrew tap
brew tap appleboy/tap - 2
Install CodeGPT with Homebrew
brew install codegpt - 3
Set your OpenAI API key
export OPENAI_API_KEY=sk-xxxxxxx
Things to know
- The default OpenAI provider requires an API key from a paid LLM service, or a self-hosted alternative such as Ollama.
In collections
Topics
FAQ
- What is CodeGPT?
- A Go CLI that generates git commit messages and brief code reviews with LLMs, and can install a prepare-commit-msg git hook. CodeGPT is a command-line tool written in Go that drafts git commit messages from your staged changes and produces brief code review summaries. It can run directly as a `codegpt commit` or `codegpt review` command, or be installed as a prepare-commit-msg git hook so the generated message appears in your editor when you commit.
- Is CodeGPT free to use? What license does it have?
- CodeGPT is open source under the MIT license. Check the license terms before using it in commercial products.
- Is CodeGPT still maintained?
- Updated within 6 months. The last commit to CodeGPT was on Sep 29, 2026.
- What can I use CodeGPT for?
- Writing clear commit messages for changes without spending time on wording. Getting a quick second look at staged changes before opening a pull request. Running commit message generation against a local model through Ollama. Standardizing commit history across a team with a shared template.
- How do I install CodeGPT?
- Add the Homebrew tap: brew tap appleboy/tap Install CodeGPT with Homebrew: brew install codegpt Set your OpenAI API key: export OPENAI_API_KEY=sk-xxxxxxx
- Where can I get CodeGPT?
- The source code and installation instructions are on GitHub: https://github.com/appleboy/CodeGPT
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A git prepare-commit-msg hook that uses OpenAI models to draft commit messages from your staged changes.
A CLI tool that generates conventional git commit messages from your staged diff using AI models, then commits them.
An unofficial, zero-dependency Go client for the OpenAI API, covering Responses, Chat Completions, images, audio and more.
A git commit hook that runs an AI code review on every staged diff before the commit lands, with a browser UI for inline comments.
A CLI that generates git commit messages from your staged changes using an AI model of your choice.