Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Commit Message GeneratorNew to Visual Studio Code? Get it now.
Commit Message Generator

Commit Message Generator

jas Productions

|
64 installs
| (0) | Free
A VS Code plugin to generate commit messages following the Conventional Commit format.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Commit Message Standardization Plugin

A VS Code plugin that generates Conventional Commit messages based on Git diff analysis, helping developers write consistent and meaningful commit messages.

Features

  • Automated Commit Message Generation: Automatically generates a commit message following the Conventional Commit format based on the changes made in your code.
  • Commit Message Suggestion: Suggests commit types like feat, fix, docs, etc., based on the content of the changed files.
  • Modifiable Commit Messages: Displays the generated commit message in an input field so that users can review, modify, and manually commit it.
  • Supports Conventional Commit Guidelines: Ensures commit messages adhere to standardized guidelines, making it easier for teams to maintain a clean Git history and integrate with automated tools.

Installation

  1. Clone or download the repository.
  2. Open the folder in Visual Studio Code.
  3. Run npm install to install the necessary dependencies.
  4. Press F5 to start the extension in development mode.

To install the extension globally:

  1. Package the extension using vsce package (make sure you have the vsce tool installed).
  2. Install the generated .vsix file in your VS Code instance.

How It Works

  1. When a user stages changes or prepares to commit, the plugin automatically analyzes the Git diff.
  2. Based on the changes, the plugin generates a commit message following the Conventional Commit format.
  3. The commit message is displayed in an input box, allowing the user to modify the message before committing.

Commit Message Format

The generated commit message follows this structure:

<type>(<scope>): <subject>

[optional body]

[optional footer(s)]
  • Type: The type of change (e.g., feat, fix, docs, test, chore).
  • Scope: (Optional) The area of the codebase affected (e.g., auth, api).
  • Subject: A brief description of the changes.

Usage

  1. Generating Commit Message:

    • Open the command palette (Ctrl+Shift+P) and type Generate Conventional Commit Message.
    • The plugin analyzes the changes and generates a suggested commit message.
    • The message is displayed in an input box where you can modify it.
    • You can manually use this message to commit your changes.
  2. Example Workflow:

    • You make changes to auth.js and auth.test.js.
    • The plugin generates the following commit message:
      feat(auth): add login functionality
      
  3. Manual Commit:

    • Once the commit message is generated, you can copy it and manually commit the changes using git commit.

Configuration

  • The plugin currently works with Conventional Commit types (feat, fix, docs, chore, test). You can extend or modify this list based on your project needs.
  • Additional configuration options such as custom commit types or stricter message formatting can be added by modifying the code.

Example

Input: Changes to src/app.js and README.md

Output Commit Message:

feat(app): updated app functionality, updated documentation

Future Improvements

  • Support for more commit types such as style, refactor, and perf.
  • Deeper code analysis to generate more specific commit descriptions.
  • Integration with Git hooks for auto-commit suggestions during the commit process.

Contributing

Contributions are welcome! Please fork this repository, make your changes, and submit a pull request.

License

This project is licensed under the MIT License.


Dependencies

  • simple-git: Used to interact with the Git repository and retrieve diffs.
  • TypeScript: The plugin is written in TypeScript for type safety and easier development.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft