
CommitGen
Generate meaningful Git commit messages with GPT, directly from your staged changes in VS Code.

Features
- Generates concise and conventional commit messages from
git diff
- Supports multiple languages: English, Korean, Japanese, Chinese
- Follows Conventional Commits format
- Supports multiple OpenAI models:
gpt-4o
, gpt-4-turbo
, gpt-3.5-turbo
, etc.
- Secure API key storage via VS Code settings
- Easy to use with minimal configuration
Installation
Install from VS Code Marketplace (Recommended)
You can install CommitGen directly from the Visual Studio Code Marketplace.
- Open VS Code
- Go to the Extensions view (Ctrl+Shift+X or Cmd+Shift+X)
- Search for
CommitGen
- Click Install
Download from this repository
- Download the
.vsix
file from Releases
- In VS Code, press
Ctrl+Shift+P
(or Cmd+Shift+P
on macOS)
Extensions: Install from VSIX...
- Select the downloaded
.vsix
file
Build from Source (Manual Installation)
If you prefer to build the extension yourself from the source code:
Clone this repository:
git clone https://github.com/WoongheeLee/vscode-commitgen.git
cd vscode-commitgen
Install dependencies:
npm install
Package the extension:
If you have vsce
installed globally:
vsce package
Or use npx
without installing globally:
npx vsce package
This will generate a .vsix
file (e.g., vscode-commitgen-0.1.4.vsix
).
Install the extension in VS Code:
- Open VS Code
- Press
Ctrl+Shift+P
(or Cmd+Shift+P
on macOS)
- Select "Extensions: Install from VSIX..."
- Choose the generated
.vsix
file
You can also use fnm or nvm to manage Node.js and npm locally without requiring global or sudo installs.
Build from Source (Manual Installation)
If you prefer to build the extension yourself from the source code:
Clone this repository:
git clone https://github.com/WoongheeLee/vscode-commitgen.git
cd vscode-commitgen
Install dependencies:
npm install
Package the extension:
If you have vsce
installed globally:
vsce package
Or use npx
without installing globally:
npx vsce package
This will generate a .vsix
file (e.g., vscode-commitgen-0.1.4.vsix
).
Install the extension in VS Code:
- Open VS Code
- Press
Ctrl+Shift+P
(or Cmd+Shift+P
on macOS)
- Select "Extensions: Install from VSIX..."
- Choose the generated
.vsix
file
You can also use fnm or nvm to manage Node.js and npm locally without requiring global or sudo installs.
Getting Started
- Open a Git-enabled project
- Stage your changes (
git add .
)
- Run the command:
CommitGen: Generate Commit Message
- A commit message will be generated using the selected model and language
If this is your first time using CommitGen, you will be prompted to enter your OpenAI API key:
File → Preferences → Settings → Extensions → CommitGen
Configuration
You can customize the following options:
Setting |
Default |
Description |
commitgen.apiKey |
"" |
Your OpenAI API key |
commitgen.model |
gpt-4o-mini |
LLM model to use (gpt-4o , gpt-3.5-turbo , etc.) |
commitgen.language |
english |
Language of the commit message |
Example Output
- Refactored the user login flow to handle edge cases
+ Added unit tests for login and token validation
Generated commit message:
test(auth): add unit tests for login and token validation
License
This project is licensed under the MIT License.
Contributing
Gladly welcoming contributors!
Feel free to fork, improve, and send a pull request.
TODO
- [ ] Automatically close the terminal after committing a message
- [ ] Support inclusion/exclusion filters for diff targets (e.g., specific file extensions or directories), to reduce unnecessary API calls