Skip to content

GabrielBaiano/auto_committer

Repository files navigation

AI Simple Commiter (for VS Code)

A VS Code extension that uses AI to generate commit messages.
Let AI write your commit messages directly in your editor.

🇧🇷 Português    |    📦 VS Marketplace    |    🧰 Open VSX    |    🐛 Report Bug

VS Marketplace Version Open VSX Version GitHub stars GitHub issues License


Auto Commiter is a VS Code extension that analyzes your git diff --staged and uses generative AI (OpenAI or Google Gemini) to automatically create descriptive and accurate commit messages, integrating directly into your Source Control panel.

📚 Project Evolution: This project was created to streamline the development workflow, saving time and improving the quality of commit history by leveraging the power of modern AI models inside the code editor.

🎓 Main Features

  • AI-Powered Commits: Automatically generates commit messages based on staged changes.
  • Multi-Provider Support: Choose between OpenAI (GPT), Google (Gemini) models or Claude AI.
  • VS Code Integration: Populates the commit message box in the Source Control panel.
  • Command Palette: Access functionality quickly via the VS Code Command Palette (Ctrl+Shift+P).

🤖 How It Works & Supported Models

How It Works

  1. The extension activates when you open a Git repository in VS Code.
  2. After staging your changes (git add .), go to the Source Control panel.
  3. Click the "Auto Commiter" icon (or run the command) to generate a message.
  4. The extension securely sends your git diff --staged to your chosen AI provider (OpenAI, Claude, or Gemini).
  5. The AI analyzes the code changes and returns a suggested commit message.
  6. The generated message is automatically placed in the commit input box, ready for you to review and commit.

Supported AI Models

You can choose from the following models in the extension's settings:

  • OpenAI:
    • gpt-3.5-turbo
    • gpt-4
    • gpt-4-turbo
  • Anthropic Claude:
    • claude-3-5-sonnet-20241022
    • claude-3-5-haiku-20241022
    • claude-3-opus-20240229
    • claude-3-sonnet-20240229
    • claude-3-haiku-20240307
  • Google Gemini:
    • gemini-1.0-pro
    • gemini-1.5-pro-latest
    • gemini-2.0-flash

🛠️ Technologies Used

  • Environment: Visual Studio Code
  • Language: TypeScript (or JavaScript)
  • API: VS Code Extension API
  • AI Integration: OpenAI API, Google Gemini API

🚀 Quick Start

📥 Installation

  1. Open Visual Studio Code.
  2. Go to the Extensions view (or press Ctrl+Shift+X).
  3. Search for "Auto Commiter".
  4. Click Install.

Alternatively, launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter:

🧭 Commands & Usage

  • Status Bar Button: Click the "AI Commit" button on the VS Code status bar to generate a message.
  • Command Palette:
    • "AI Commit: Generate Commit Message with AI" (aiCommit.generate)
    • "AI Commit: Configure AI Commit" (aiCommit.configure) — set provider, API key, and model

🌐 Commit Message Language

  • Go to Settings → search for "AI Commit" → set Language.
  • Supported values: pt, en, es, fr, de, it (default: pt).
  • Alternatively, set in settings.json:
    {
      "aiCommit.language": "en"
    }

📄 License

This project is licensed under the MIT License.

About

making commits easyer

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors