SuperAPI AI Directory

gptcomet

GPTComet is an AI-powered Git commit message generation and code review tool, designed to automatically generate commit messages and provide intelligent code review. It supports multiple large language model providers such as OpenAI, Gemini, Claude/Anthropic, Vertex, Azure, Ollama, and others, is compatible with Git and SVN repositories, and supports multilingual output and custom configuration. Users can deploy it via Homebrew, pip, or an installation script, use gmsg commit to generate commit messages, and use gmsg review to get code review feedback.

Open website

About this tool

Purpose

GPTComet is an AI tool for developers that simplifies the Git workflow and improves code quality. Its main features are automatically generating Git commit messages and intelligently reviewing staged code. It uses large language models to automate repetitive tasks and improve the overall development process.

Main Capabilities

  • Automatic commit message generation: automatically generates commit messages based on code changes.
  • Intelligent code review: provides code review based on AI and gives actionable feedback and suggestions.
  • Progress indication: an optional verbose mode displays real-time progress for long-running operations.
  • Multilingual support: supports multiple languages including English and Chinese.
  • Customizable configuration: users can customize configuration, such as the large language model and prompts.
  • Support for rich commit messages: commit messages can include a title, summary, and detailed description.
  • Multi-provider support: supports providers such as OpenAI, Gemini, Claude/Anthropic, Vertex, Azure, Ollama, and others.
  • Supports both SVN and Git repositories.

Usage

Installation can be done via Homebrew, GitHub release download, installation script, or pip (pypi). The usage steps are as follows:

  1. Install GPTComet (install via pypi).
  2. Configure GPTComet: set necessary configuration such as api_key, for example provider (default openai), api_base (default https://api.openai.com/v1)、api_key、model(默认 gpt-4o).
  3. Run GPTComet: execute the command gmsg commit. If using the openai provider and api_key has been set, you can run gmsg commit directly.

There are two configuration methods:

  • Direct configuration: configure in ~/.config/gptcomet/gptcomet.yaml.
  • Interactive setup: use the gmsg newprovider command for guided setup.

The main commands include:

  • gmsg config: configuration management command group, including get <key>, list, reset (--prompt can be used to reset only the prompt section), set <key> <value>, path, remove <key> [value] (list values only), append <key> <value> (list values only), keys.
  • gmsg commit: generate a commit message based on the change/diff. Supports parameters --svn, --dry-run, -y/--yes, --no-verify, --repo, --answer-path, --api-base, --api-key, --completion-path, --frequency-penalty, --max-tokens, --model, --provider, --proxy, --retries, --temperature, --top-p.
  • gmsg newprovider: add a new provider.
  • gmsg review: review the staged diff, or pipe it to gmsg review. Supports parameters --svn, --stream, --repo, --answer-path, --api-base, --api-key, --completion-path, --frequency-penalty, --max-tokens, --model, --provider, --proxy, --retries, --temperature, --top-p.

Configuration Notes

The configuration file is gptcomet.yaml. The main configuration keys include:

  • output.translate_title: determines whether to translate the commit message title. For example outpuWhen t.lang: zh-cn, the title is feat: Add new feature; if output.translate_title is true, it is translated as 功能:新增功能; otherwise it is translated as feat: 新增功能.
  • In some cases, completion_path can be set to an empty string, such as <provider>.completion_path: "", to directly use the api_base endpoint.
  • file_ignore: files to ignore when generating a commit; for the default values, refer to the documentation. You can use gmsg config append file_ignore <xxx> to add more ignore entries; the syntax is the same as gitignore, such as *.so.
  • provider: the provider of the language model, default openai. If you use an OpenAI-compatible interface, you can set provider to openai and customize api_base, api_key, and model. For example, OpenRouter can set provider to openai, api_base to https://openrouter.ai/api/v1;Silicon similarly, api_base is https://api.siliconflow.cn/v1。注意 max tokens may vary by model, and an error will be reported if it is too large.
  • output: output configuration for the commit message. You can set rich_template to modify the rich commit message template, and set lang to change the language. Supported languages include zh-cn, zh-tw, vi, id, pt, lt, mk.
  • Markdown theme: supports auto (default, auto-detect), ascii, dark, dracula, light, tokyo-night, notty, pink. When not set, it is auto-detected: light terminals use the dark theme, and dark terminals use the light theme. GPTComet uses glamour to render Markdown.
  • console: console output configuration. When verbose is true, it enables progress indicators (such as [1/2] Fetching git diff..., etc.), displays the provider and model used, and enhances error information (including a clear problem description, specific suggested solutions, relevant documentation links, and emoji markers). When verbose is false, it runs in silent mode, suitable for scripts and automated workflows. You can use gmsg config keys to view the supported keys.

Use cases and limitations

Suitable for developers who want to automatically generate standardized commit messages and use AI for code review, especially for teams that need multiple model providers, multilingual output, and Git or SVN workflows. Installation methods include Homebrew, GitHub release, installation script, and pip. Development requires Go and Python environments, and testing uses pytest, etc. The project is open source under the MIT License. Regarding specific fees, prices, platform details, etc., the materials do not clearly provide them.