AI-powered VS Code extension that automatically analyzes Git code changes and generates high-quality commit messages.
Features
- AI Auto-Generation — Analyzes
git diffcontent and generates commit messages with one click - Source Control Integration — Click the sparkle button directly in the Git panel
- Multiple Styles — Supports Conventional Commits, Simple, and Detailed modes
- Bilingual Support — Choose between Chinese or English for generated messages
- Multi-Platform Compatible — Supports OpenAI-format APIs (DeepSeek, OpenAI, etc.)
- Custom Prompt — Append custom system prompts to control generation behavior
Installation
- Search for "Smart Commit Message" in the VS Code Extension Marketplace
- Click Install
Usage
- Edit your code in the editor
- Open the Source Control panel (Ctrl+Shift+G)
- Click the sparkle button in the toolbar, or press
Ctrl+Shift+Pand type "Generate Commit Message" - The generated commit message will be automatically filled into the input box
Configuration
Search for Smart Commit Message in VS Code Settings:
| Setting | Description | Default |
|---|---|---|
smartCommitMessage.apiKey |
API Key for the AI service | - |
smartCommitMessage.baseUrl |
OpenAI-compatible API base URL | https://api.deepseek.com |
smartCommitMessage.model |
Model name for commit generation | deepseek-v4-flash |
smartCommitMessage.style |
Commit message style (conventional / simple / detailed) | conventional |
smartCommitMessage.language |
Language for generated commits (English / Chinese) | Chinese |
smartCommitMessage.customPrompt |
Custom system prompt appended after the style template | - |
Quick Start (DeepSeek)
- Get your API Key from the DeepSeek Platform
- Set
smartCommitMessage.apiKeyin VS Code Settings - DeepSeek's baseUrl and model are pre-configured by default — just click the sparkle button to use
Commit Style Reference
- conventional — Follows the Conventional Commits spec, e.g.
feat(scope): description - simple — One concise sentence describing the change
- detailed — Short summary + detailed change description
Development & Release
git clone https://github.com/bin-ran/smart-commit-message.git
cd smart-commit-message
npm install
# Press F5 to launch Extension Host debugging
npm install -g @vscode/vsce
vsce package # Package
vsce publish # Publish
License
MIT