Skip to content
| Marketplace
Sign in
Visual Studio Code>SCM Providers>Commit Message CrafterNew to Visual Studio Code? Get it now.
Commit Message Crafter

Commit Message Crafter

AmraGori

|
1 install
| (0) | Free
Generate git commit messages using a local, open-source AI model (via Ollama) — no API keys, no data leaves your machine.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Commit Message Crafter

Commit Message Crafter

A VS Code extension that writes your git commit messages using a local, open-source AI model — no API keys, nothing leaves your machine.

It reads your staged git diff, sends it to a model running on your own computer (via Ollama, LM Studio, or any OpenAI-compatible local server), and drops the result straight into the Source Control commit box.


Quick start

Setup has two halves: install the extension, and run a local model for it to talk to. You need both. There is no cloud fallback.

  1. Install the extension: open the Extensions panel (Ctrl/Cmd+Shift+X), search for Commit Message Crafter by Amragori, and click Install.
  2. Install Ollama and download the default model:
    ollama pull llama3.2:3b
    
    Have 16 GB of RAM or more? Use llama3.1 instead for noticeably better messages. See Recommended: Llama 3.1.
  3. Open a git repository, stage a change, and click Commit msg in the status bar at the bottom of the window. The message appears in the Source Control commit box.

After installing, VS Code shows a "Set up Commit Message Crafter" walkthrough. Reopen it any time from the Command Palette with AI Commit: Open Setup Guide.

Features

  • 🔒 100% local: no API keys, no network calls beyond localhost.
  • ⚡ One click from the Source Control panel: AI: Generate Commit Message.
  • 📝 Conventional Commits, Gitmoji, or plain style.
  • 🧠 Works with any model your local server can run (Llama, Qwen2.5-Coder, Mistral, DeepSeek-Coder, and others), and switching takes one setting.
  • 📦 Handles large change sets: when a diff is too long to send in full, every file is still listed and each one gets a share of the space.
  • 🩹 No staged changes? It offers to use your full diff instead. No git repo detected? It shows the message for you to copy.
  • 🔍 An optional "show diff used" command shows exactly what was sent to the model.
  • 🎫 Picks up a Jira-style issue key from your branch name and inserts it (feat[CM-443]: ...).

Requirements

Needed for Check
VS Code 1.85+ The extension itself Help → About
Git Reading the diff git --version
A local AI server Generating the message see below

Installing the extension

In VS Code: open the Extensions panel (Ctrl/Cmd+Shift+X), search for Commit Message Crafter by Amragori, and click Install.

Or from a terminal:

code --install-extension amragori.commit-message-crafter

No code command? Run Shell Command: Install 'code' command in PATH from the Command Palette, or use the Extensions panel instead.

Updating

VS Code updates the extension automatically when a new version is published. Your settings carry over.

Uninstalling

Extensions panel → find Commit Message Crafter → gear icon → Uninstall. Or:

code --uninstall-extension amragori.commit-message-crafter

Installing from a .vsix file

If you were given a .vsix file instead: Extensions panel → ... menu (top right) → Install from VSIX... → select the file, then reload the window (Ctrl/Cmd+Shift+P → Developer: Reload Window).

Setting up a local model server

You need one model server running. Pick whichever you prefer.

Option A: Ollama (recommended, simplest)

  1. Install from ollama.com/download. On macOS and Windows it runs in the background automatically. On Linux, start it with ollama serve.
  2. Download a model:
    ollama pull llama3.2:3b
    
  3. Check that it is running:
    curl http://localhost:11434/api/tags
    
    A JSON list of your models means it's working.

No extension settings need changing. Ollama on http://localhost:11434 is the default.

Option B: LM Studio

  1. Install LM Studio, then download and load a model.
  2. Open the Developer tab and click Start Server.
  3. In VS Code settings, set:
    {
      "commitMessageGenerator.provider": "lmstudio",
      "commitMessageGenerator.endpoint": "http://localhost:1234",
      "commitMessageGenerator.model": "<model name shown in LM Studio>"
    }
    

Option C: Any OpenAI-compatible server

llama.cpp's server, text-generation-webui, vLLM, and anything else that exposes POST /v1/chat/completions:

{
  "commitMessageGenerator.provider": "custom",
  "commitMessageGenerator.endpoint": "http://localhost:8080",
  "commitMessageGenerator.model": "<model name your server expects>"
}

Choosing and switching models

The default model is llama3.2:3b because it runs on almost any machine, including those with 8 GB of RAM. A larger model writes better messages if your computer has the memory for it.

Recommended: Llama 3.1 for better messages

If your machine meets the requirements below, we recommend llama3.1. It is more than twice the size of the default model, and larger models are generally better at working out the purpose of a change. That shows most on commits that touch many files, where the small default model sometimes describes one file instead of the whole change.

Minimum requirements for llama3.1:

Minimum
Memory (RAM) 16 GB. It does not run usably on an 8 GB machine
Free disk space 5 GB (the download is 4.9 GB)
Processor Apple Silicon Mac (M1 or newer), or a PC with a graphics card that has 8 GB or more of video memory (VRAM)

It also runs on a PC without a suitable graphics card, using the processor instead, as long as it has 16 GB of RAM. Expect messages to take noticeably longer.

How much RAM do you have?

  • Mac: Apple menu → About This Mac → Memory
  • Windows: Settings → System → About → Installed RAM
  • Linux: run free -h and look at the total column

If you meet the requirements, follow Switching to a different model below with llama3.1. Afterwards, confirm it fits by running ollama ps straight after generating a message: PROCESSOR should say 100% GPU. If it shows a CPU/GPU split, your machine doesn't have enough free memory for it. Close other heavy apps, or switch back to llama3.2:3b.

Which model fits your machine

The model has to fit entirely in memory. If it doesn't, generation slows to a crawl or times out.

Model Download command RAM needed Notes
Llama 3.2 3B ollama pull llama3.2:3b 8 GB Default. Fast; good for everyday commits
Qwen2.5-Coder 7B ollama pull qwen2.5-coder:7b 16 GB Trained on code; a good all-round choice
Llama 3.1 8B ollama pull llama3.1 16 GB Recommended if you have the RAM. Better messages, especially for large change sets
DeepSeek-Coder V2 16B ollama pull deepseek-coder-v2 32 GB Strongest on large diffs; slowest

Any other model from the Ollama library works too. A model needs a little more memory than its download size once loaded, and your editor, browser and system need room alongside it. So as a rule of thumb, pick a model whose download is under a third of your total RAM.

Switching to a different model (Ollama)

Here is how to switch from llama3.2:3b to llama3.1. The same steps work for any model.

  1. Download the new model:
    ollama pull llama3.1
    
  2. Check its exact name:
    ollama list
    
    You'll see llama3.1:latest. You can use either llama3.1 or llama3.1:latest in the setting. For any other tag, such as qwen2.5-coder:7b, copy the name exactly, tag included.
  3. Tell the extension to use it. Either:
    • Run AI Commit: Open Settings from the Command Palette, find Model, and type llama3.1, or
    • Add this to your settings.json (Command Palette → Preferences: Open User Settings (JSON)):
      "commitMessageGenerator.model": "llama3.1"
      
  4. Generate a message. The new setting applies straight away, with no reload needed. The first message after a switch takes longer (often 10–30 seconds) while the model loads into memory. After that it is fast.
  5. Check that the model fits. Right after generating, run:
    ollama ps
    
    The PROCESSOR column should say 100% GPU (on Apple Silicon and most machines with a GPU). A split such as 18%/82% CPU/GPU means the model doesn't fit in memory. Switch back to a smaller model.

To free disk space, you can delete a model you no longer use, for example ollama rm llama3.2:3b. Don't delete the model the setting points at.

Switching back

Set Model back to llama3.2:3b. Or, in the Settings UI, click the gear next to the setting and choose Reset Setting.

A different model for one project

Settings can be set for a single repository. In the Settings UI, switch to the Workspace tab before changing Model, or add the line to .vscode/settings.json in that repository. Every other project keeps your default.

Switching models in LM Studio or another server

Download and load the new model in LM Studio (or your server), then set commitMessageGenerator.model to the name the server uses for it. To list the names your server knows:

curl http://localhost:1234/v1/models

(Use your server's port if it isn't LM Studio's 1234.)

Usage

  1. Stage your changes (git add ...). If nothing is staged, the extension offers to use your full working-tree diff instead.

  2. Run AI: Generate Commit Message from any of:

    • the Commit msg button in the status bar at the bottom of the window. It's always visible when a git repository is open, and shows a spinner while the message is being written;
    • the Commit Message Crafter button at the top of the Source Control panel, among the small icons beside the Source Control heading: the commit-graph icon with a sparkle;
    • the Command Palette (Ctrl/Cmd+Shift+P).

    If the Source Control sidebar has several sections (GitLens, for example, adds some), VS Code shows that button only while your mouse is over the Source Control heading. To show it all the time, set "workbench.view.alwaysShowHeaderActions": true.

  3. The message appears in the commit box. Review it, edit it if you like, and commit as usual. The extension never commits for you.

Automatic Jira key linking

If your branch name contains a Jira-style issue key, for example branch CM-443-add-login-validation, the extension finds CM-443 and inserts it:

feat[CM-443]: add login form validation

This is on by default. Turn it off with commitMessageGenerator.includeJiraKey: false, or change commitMessageGenerator.jiraKeyPattern if your team's keys look different from the default pattern ([A-Za-z]{2,10}-\d+).

Commands

All available from the Command Palette (Ctrl/Cmd+Shift+P):

Command What it does
AI: Generate Commit Message Generates and inserts the message
AI: Generate Commit Message (Show Diff Used) Same, and also opens the exact diff sent to the model
AI Commit: Open Setup Guide Reopens the in-editor setup walkthrough
AI Commit: Open Settings Jumps to this extension's settings

Settings

Setting Default Description
commitMessageGenerator.provider ollama ollama, lmstudio, or custom
commitMessageGenerator.endpoint http://localhost:11434 Base URL of your local server
commitMessageGenerator.model llama3.2:3b Model name as your server knows it. See Choosing and switching models
commitMessageGenerator.showStatusBarButton true Show the Commit msg button in the status bar
commitMessageGenerator.commitStyle conventional conventional, plain, or gitmoji
commitMessageGenerator.includeBody true Add a bullet-point body for non-trivial changes
commitMessageGenerator.maxDiffChars 8000 How much of the diff to send. Larger changes are shortened, but every file is still listed
commitMessageGenerator.temperature 0.3 Lower = more consistent messages
commitMessageGenerator.autoStageCheck true Warn when nothing is staged instead of silently using all changes
commitMessageGenerator.includeJiraKey true Insert a Jira key from the branch name as type[KEY]: subject
commitMessageGenerator.jiraKeyPattern [A-Za-z]{2,10}-\d+ Regex used to find the Jira key in the branch name

Privacy

The only network request the extension makes is to the endpoint you configure, which defaults to localhost. Your code and diffs never leave your machine unless you deliberately point commitMessageGenerator.endpoint at a remote server.

Troubleshooting

"Could not reach local AI server": almost always one of three things:

  1. The server isn't running. Check with curl http://localhost:11434/api/tags; if the connection is refused, start Ollama (ollama serve).
  2. The port doesn't match: Ollama uses 11434 and LM Studio uses 1234. Check commitMessageGenerator.endpoint.
  3. The provider is wrong. LM Studio and other servers need provider set to lmstudio or custom.

"Model not found" or an empty response: commitMessageGenerator.model doesn't match a model your server has. Run ollama list and copy the name exactly, tag included. If you just switched models, check that you ran ollama pull for it.

Generation is slow, or the request times out: the model is probably too large for your computer's memory. Run ollama ps straight after a request: if PROCESSOR isn't 100% GPU, switch to a smaller model (see Which model fits your machine). Closing other memory-heavy apps also helps. The first request after VS Code starts, or after switching models, is always slower while the model loads.

"No changes detected": there is nothing to describe. Make or stage a change first. Lockfiles are left out of the diff on purpose.

The message isn't inserted into the commit box: VS Code's built-in Git extension hadn't started yet. Open the Source Control panel once, then try again. The message is also shown in a dialog with a Copy to Clipboard button, so it's never lost.

Can't find a button to click: the easiest is Commit msg in the status bar at the bottom of the window. If it's missing, check that the open folder is a git repository and that commitMessageGenerator.showStatusBarButton is on. The other button is at the top of the Source Control panel, beside the Source Control heading, and not inside the commit message box: VS Code only allows Microsoft's own extensions, such as GitHub Copilot, to place buttons there. If the Source Control sidebar has several sections (GitLens, for example, adds some), VS Code shows that button only while your mouse is over the Source Control heading. To show it all the time, set "workbench.view.alwaysShowHeaderActions": true. You can always run AI: Generate Commit Message from the Command Palette as well.

Install fails with a version error: your VS Code is older than 1.85. Update VS Code (Code → Check for Updates).

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft