README.md

May 5, 2026 · View on GitHub

AI Commit

Use OpenAI / Azure OpenAI / DeepSeek / Grok / Gemini / Claude (Anthropic) API to review Git changes, generate conventional commit messages that meet the conventions, simplify the commit process, and keep the commit conventions consistent.

English · 简体中文 · Report Bug · Request Feature

✨ Features

  • 🤯 Support generating commit messages based on git diffs using OpenAI / Azure OpenAI / DeepSeek / Grok / Gemini / Claude (Anthropic) API.
  • 🧠 Support OpenAI Responses API with configurable reasoning effort and output verbosity.
  • 🗺️ Support multi-language commit messages.
  • 😜 Support adding Gitmoji.
  • 🛠️ Support custom system prompt.
  • 📝 Support Conventional Commits specification.

📦 Installation

  1. Search for "AI Commit" in VSCode and click the "Install" button.
  2. Install it directly from the Visual Studio Code Marketplace.

Note
Make sure your node version >= 16

🤯 Usage

  1. Ensure that you have installed and enabled the "AI Commit" extension.
  2. In VSCode settings, locate the "ai-commit" configuration options and configure them as needed.
  3. Make changes in your project and add the changes to the staging area (git add).
  4. (Optional) If you want to provide additional context for the commit message, type it in the Source Control panel's message input box before clicking the AI Commit button.
  5. Next to the commit message input box in the "Source Control" panel, click the "AI Commit" icon button. After clicking, the extension will generate a commit message (considering any additional context if provided) and populate it in the input box.
  6. Review the generated commit message, and if you are satisfied, proceed to commit your changes.

Note
If the code exceeds the maximum token length, consider adding it to the staging area in batches.

⚙️ Configuration

Note Version >= 0.0.5 Don't need to configure EMOJI_ENABLED and FULL_GITMOJI_SPEC, Default Prompt is prompt/with_gitmoji.md, If don't need to use Gitmoji. Please set SYSTEM_PROMPT to your custom prompt, please refer to prompt/without_gitmoji.md.

In the VSCode settings, locate the "ai-commit" configuration options and configure them as needed:

ConfigurationTypeDefaultRequiredNotes
AI_PROVIDERstringopenaiYesAI Provider to use: openai, gemini, or claude
OPENAI_API_KEYstringNoneYesRequired when AI_PROVIDER is openai. OpenAI token
OPENAI_BASE_URLstringNoneNoIf using Azure, use: https://{resource}.openai.azure.com/openai/deployments/{model}
OPENAI_MODELstringgpt-4oYesOpenAI model. Run the Show Available OpenAI Models command to pick from available models
AZURE_API_VERSIONstringNoneNoAzure API version string
OPENAI_TEMPERATUREnumber0.7NoControls randomness. Range: 0–2. Lower = more focused, Higher = more creative. (Chat Completions only)
OPENAI_API_TYPEstringcompletionNoChoose API: completion (Chat Completions) or response (Responses API)
OPENAI_REASONING_EFFORTstringmediumNoReasoning effort for Responses API: minimal, low, medium, high. Only applies when OPENAI_API_TYPE is response
OPENAI_TEXT_VERBOSITYstringmediumNoOutput verbosity for Responses API: low (~1000 tokens), medium (~4000 tokens), high (~16000 tokens)
GEMINI_API_KEYstringNoneYesRequired when AI_PROVIDER is gemini. Gemini API key
GEMINI_MODELstringgemini-2.0-flash-001YesGemini model to use
GEMINI_TEMPERATUREnumber0.7NoControls randomness. Range: 0–2. Lower = more focused, Higher = more creative
CLAUDE_API_KEYstringNoneNoAnthropic API key. Leave empty to use Claude CLI (authenticated via claude setup-token). Required when AI_PROVIDER is claude
CLAUDE_MODELstringclaude-sonnet-4-5-20250929NoClaude model to use
CLAUDE_TEMPERATUREnumber0.7NoControls randomness. Range: 0–1
AI_COMMIT_LANGUAGEstringEnglishYesSupports 19 languages
SYSTEM_PROMPTstringNoneNoCustom system prompt

⌨️ Local Development

You can use Github Codespaces for online development:

Alternatively, you can clone the repository and run the following commands for local development:

$ git clone https://github.com/sitoi/ai-commit.git
$ cd ai-commit
$ npm install

Open the project folder in VSCode. Press F5 to run the project. This will open a new Extension Development Host window and launch the plugin within it.

🤝 Contributing

Contributions of all types are more than welcome, if you are interested in contributing code, feel free to check out our GitHub Issues to get stuck in to show us what you’re made of.

💗 All Thanks To Our Contributors

Credits


📝 License

This project is MIT licensed.