Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>AutoCommitNew to Visual Studio Code? Get it now.
AutoCommit

AutoCommit

Dhiraj Nikam

|
182 installs
| (2) | Free
A VS Code extension to commit changes using Gemini API for generating commit messages.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Commit Wizard

Commit Wizard is a Visual Studio Code extension designed to streamline your Git workflow by automating the commit process with AI-generated messages. Powered by the Gemini API, Commit Wizard ensures your commit messages are concise, meaningful, and adhere to the Conventional Commit standard—all while intelligently grouping related changes into logical commits.

Features

  • AI-Generated Commit Messages: Automatically generate commit messages with Conventional Commit prefixes (e.g., feat, fix, docs, style, etc.).
  • Smart Commit Grouping: Instead of processing changes based solely on individual files, Commit Wizard sends a unified diff to the Gemini API. Gemini then analyzes and groups related changes together, returning a JSON array with file groups and their corresponding commit messages.
  • Streamlined Git Workflow: Automates staging, generating commit messages, and committing files—either grouped by Gemini’s analysis or on a per-file basis.
  • Customization: Configure your Gemini API key and default behaviors (such as auto-confirmation and commit grouping) via VS Code settings.

Requirements

  • Git: Installed and properly configured on your system.
  • Gemini API Key: Obtain your API key from the Gemini API Portal to enable AI-powered commit messages.

Extension Settings

Commit Wizard introduces the following settings in VS Code:

  • commitWizard.apiKey: Your Gemini API key for generating AI-powered commit messages.
  • commitWizard.defaultPrefix: The fallback Conventional Commit prefix to use if the AI response is missing or invalid (default: refactor).
  • commitWizard.groupCommits: When enabled, all changes are sent as a unified diff to Gemini for logical grouping into commits.
  • commitWizard.autoConfirmCommit: When enabled, the AI-generated commit messages are used automatically without prompting for user confirmation.

Installation

  1. Install from Marketplace: Search for "Commit Wizard" in the VS Code Marketplace and install it.
  2. Manual Installation: Download the .vsix package and install it manually:
    • Open the Extensions view (Ctrl+Shift+X / Cmd+Shift+X).
    • Click the ... (More Actions) menu and select Install from VSIX.
    • Choose the downloaded .vsix file.

Usage

  1. Open a Git Repository: Ensure your project is a Git repository opened in VS Code.

  2. Configure API Key: Set your commitWizard.apiKey via the Set Gemini API Key command.

  3. Run Commands: Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and use one of the following commands:

    • Commit All Changes Individually / Grouped:
      Run Commit Wizard: Commit All Changes to commit all detected changes.

      • If groupCommits is enabled, the extension will send the unified diff to Gemini, receive commit groups (each with a list of files and a message), and commit each group accordingly.
      • Otherwise, each file is processed individually.
    • Commit Staged Changes:
      Run Commit Wizard: Commit Staged Changes to commit all staged changes in a single commit, with an AI-generated message.

Workflow Example

  1. Modify Files: Edit, add, or delete files in your project.

  2. Run Command: Use Commit Wizard: Commit All Changes.

  3. AI-Powered Commit Grouping:
    Gemini analyzes your unified diff and groups related changes. For example:

    [
      {
        "files": ["src/app.js", "src/utils.js"],
        "message": "feat: enhance API request handling"
      },
      {
        "files": ["README.md"],
        "message": "docs: update documentation"
      }
    ]
    

    The extension stages each group and commits them with the suggested messages, optionally allowing you to review and edit each commit message if autoConfirmCommit is disabled.

Commands

Command Description
Set Gemini API Key Configure your Gemini API key for generating commit messages.
Commit All Changes Analyze all changes in the repository and commit them either individually or in groups.
Commit Staged Changes Commit all staged changes with a single AI-generated message.

Contributing

Contributions are welcome! To contribute:

  1. Fork the repository.
  2. Create a new branch for your feature or bugfix.
  3. Submit a pull request with a detailed description of your changes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Support

If you encounter any issues or have suggestions for improvements, please open an issue on GitHub.

Acknowledgments

  • Gemini API: For providing the AI-powered text generation capabilities.
  • VS Code: For the extensible platform that makes this extension possible.

Enjoy using Commit Wizard to simplify and enhance your Git workflow! 🚀

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