Skip to content
| Marketplace
Sign in
Visual Studio Code>SCM Providers>AI Conventional Commit GeneratorNew to Visual Studio Code? Get it now.
AI Conventional Commit Generator

AI Conventional Commit Generator

Rentalhost

| (0) | Free
AI Conventional Commit Generator.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

AI Conventional Commit Generator

Available languages: English | Português | Français | Español | Italiano


An intelligent VS Code extension that automatically generates conventional commit messages using AI. This extension analyzes your changes, whether staged or not, and creates properly formatted commit messages following the conventional commit specification.

Changes in log files, lock files, or environment files are never sent. Ensuring more efficient and secure commit generation.

Features

  • AI-powered commit generation: uses the OpenAI model of your choice to analyze code changes and generate meaningful commit messages
  • Conventional commit format: follows the conventional commit specification with proper type, scope, and description formatting
  • Flexible configuration: supports both global extension settings and per-project configuration via ai-commit.json
  • Language support: generates commit messages in the language you prefer
  • Contextual analysis: analyzes file changes, git history, and project context for better commit messages
  • Customizable output: controls emoji inclusion, scope, body content, and breaking changes as you prefer
  • Model selection: automatically manages model availability and provides fallback options

Installation

  1. Open VS Code
  2. Go to Extensions
  3. Search for AI Conventional Commit Generator
  4. Click Install

Usage

  1. Stage your changes using the Source Control panel
  2. Click the blue Generate AI commit button
  3. The extension will intelligently analyze your changes and generate a commit message in a few seconds
  4. Review and modify the generated message if needed and commit your changes

Configuration

API Token via .env File

The extension now supports reading the OpenAI API token through a .env file in your project. This configuration takes priority over extension settings. Never use ai-commit.json to store private data.

Create a .env file in your project root:

AI_COMMIT_TOKEN=your_openai_api_key_here

Important: the .env file is automatically ignored by git to keep your credentials secure.

Project Configuration (ai-commit.json)

The extension prioritizes settings defined in the ai-commit.json file in your repository root. If it doesn't exist, it uses the global extension settings as fallback.

Create an ai-commit.json file in your repository root:

{
  "language": "English",
  "model": "gpt-5-mini",
  "modelReasoning": "medium",
  "types": ["feat", "fix", "docs", "style", "refactor", "test", "chore"],
  "includeEmoji": true,
  "includeScope": true,
  "includeBody": true,
  "includeBreakingChange": true,
  "additionalInstructions": "Focus on user-facing changes and performance improvements",
  "ignorePatterns": ["*.lock", "package-lock.json"],
  "importantPatterns": ["**/*.php", "src/**/*.ts"],
  "contextLength": 3,
  "historyContextLength": 5
}

Available Settings

All settings can be defined in ai-commit.json (priority) or in the global extension settings:

  • language (default "English"): language that the summary and body will be generated in;
  • model (default "gpt-5-mini"): OpenAI model that will be used to generate commit messages. More efficient models generate better messages and understand context better, but may incur higher usage costs;
  • modelReasoning (default: "low"): model reasoning level. The default low usually generates very good quality, although it has a slightly higher cost than minimal;
  • customEndpoint (default: OpenAI): custom OpenAI API endpoint. Leave empty to use the default OpenAI API endpoint. Useful for using OpenAI-compatible APIs or custom deployments;
  • types (default: ["feat", "fix", "refactor", "docs", "tests", "style", "chore", "ci", "perf"]): order in which the type should be prioritized when multiple changes are made;
  • includeEmoji (default: false): indicates whether an emoji should be attached before the message type;
  • includeScope (default: true): indicates whether the scope should be assigned after the type. The scope may not be generated in some cases where it might not make sense;
  • includeBody (default: true): indicates whether the body (description beyond the summary) should be generated. In some cases, where the summary is sufficient, a body may not be generated;
  • includeBreakingChange (default: true): indicates whether the breaking change message should be generated after the body when detected. You can allow it to be generated and edit the commit if you find it unnecessary. This way you stay aware of potential problems the update may cause;
  • additionalInstructions: additional instructions that can be added to assist generation. For example, you can add context about what the project is about or even how you prefer commits to be generated;
  • ignorePatterns: an array of strings containing globs to indicate files or folders that should be ignored and never sent for inference. By default, several patterns are already ignored, such as lock files, environment variables, and logs;
  • importantPatterns: an array of strings containing glob patterns for files that will be marked with an (important) tag in the diff output. This helps the AI identify important changes and give them more emphasis when generating commit messages. For example, in a PHP project, you might want **/*.php files to be marked as important over **/*.js files;
  • contextLength (default: 5): to generate a message, inference receives a diff of modified files including some lines before and after what was actually modified. This provides more context for more efficient generation. The higher the context, the more information, but the cost also becomes higher. Usually a value between 3 and 10 is sufficient. Use 0 to disable, but this greatly reduces context and may generate slightly more erroneous information;
  • historyContextLength (default: 10): sends your latest commit messages along to help inference generate something within the pattern you already like to use. It also gives a better sense of the change when they are sequential changes. The first commits will be sent with the complete message, including summary and body, and the rest will be sent only the summary. Use 0 to disable and save resources.

Getting Started

  1. Get an OpenAI API key:

    • Visit OpenAI API;
    • Create an API key;
    • Configure it in the extension settings.
  2. Configure your preferences:

    • Set your preferred language, model, and output format;
    • Optionally create an ai-commit.json file for project-specific settings.
  3. Start committing:

    • Stage your changes with git add or using the Source Control panel;
    • Use the blue Generate AI commit button in the Source Control panel.
    • Review and commit the generated message.

Troubleshooting

Common Issues

  1. API Key Required: make sure you've configured your OpenAI API key in the extension settings;
  2. Model unavailable: if the configured model isn't available, the extension will prompt you to select an alternative;
  3. No changes detected: ensure you have staged changes before generating a commit message. If changes exist, these files might be ignored by the extension or project settings;
  4. Permission errors: verify your OpenAI API key has the necessary permissions.

Support

For issues and feature requests, please visit the GitHub repository.

License

This extension is licensed under the Apache-2.0 License. See the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit issues and pull requests.

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