Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Git Smart CommitNew to Visual Studio Code? Get it now.
Git Smart Commit

Git Smart Commit

Werton Silva

|
30 installs
| (1) | Free
generate commits with gpt
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

VS Code Extension: Auto Commit with GPT

This extension automatically generates Conventional Commit messages for each modified file in your Git repository using OpenAI's API.

Setting Up the OpenAI API Key

Before using the extension, you need to configure your OpenAI API key. Here's how to do it:

Step 1: Obtain Your OpenAI API Key

  • Go to OpenAI's platform and sign in or create an account.
  • Navigate to the API section and create a new API key.
  • Copy the API key for the next steps.

Step 2: Configure the API Key in VS Code

To use the OpenAI API with this extension, you must add the API key to your VS Code settings:

  1. Open Visual Studio Code.
  2. Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P on macOS).
  3. Search for Preferences: Open Settings (JSON) and select it.
  4. Add the following JSON snippet to your settings file, replacing "your-openai-api-key" with your actual API key:
{
  "extension.openaiApiKey": "your-openai-api-key"
}
  1. Save the file.

Now, the extension will have access to your OpenAI API key.

Using the Extension

Once the API key is configured, follow these steps to use the extension:

  1. Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P on macOS).
  2. Type Auto Commit and select the command from the list.
  3. The extension will analyze the changes in your Git repository and generate Conventional Commit messages based on the changes.

Make sure you have Git properly configured in your project, as the extension relies on Git to detect changes.

Troubleshooting

  • API Key Not Set: If the OpenAI API key is not configured, you will see an error like:

    OpenAI API key not configured. Add the key in VS Code settings.
    

Ensure that the key is correctly added in the VS Code settings as described above.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft