Commit Message CrafterA 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 Quick startSetup has two halves: install the extension, and run a local model for it to talk to. You need both. There is no cloud fallback.
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
Requirements
Installing the extensionIn VS Code: open the Extensions panel ( Or from a terminal:
UpdatingVS Code updates the extension automatically when a new version is published. Your settings carry over. UninstallingExtensions panel → find Commit Message Crafter → gear icon → Uninstall. Or:
Installing from a
|
| 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 -hand 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.
- Download the new model:
ollama pull llama3.1 - Check its exact name:
You'll seeollama listllama3.1:latest. You can use eitherllama3.1orllama3.1:latestin the setting. For any other tag, such asqwen2.5-coder:7b, copy the name exactly, tag included. - 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"
- Run AI Commit: Open Settings from the Command Palette, find
Model, and type
- 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.
- Check that the model fits. Right after generating, run:
Theollama psPROCESSORcolumn should say100% GPU(on Apple Silicon and most machines with a GPU). A split such as18%/82% CPU/GPUmeans 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
Stage your changes (
git add ...). If nothing is staged, the extension offers to use your full working-tree diff instead.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.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:
- The server isn't running. Check with
curl http://localhost:11434/api/tags; if the connection is refused, start Ollama (ollama serve). - The port doesn't match: Ollama uses
11434and LM Studio uses1234. CheckcommitMessageGenerator.endpoint. - The provider is wrong. LM Studio and other servers need
providerset tolmstudioorcustom.
"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