VS Code Extension to generate conventional commit messages using a local Ollama model.
- Generates commit messages from git diff
- Uses local model (gpt-oss:20b)
- Allows editing before commit
- One-click button in Source Control panel
- Ollama running locally
- Model installed: gpt-oss:20b
- Node.js + npm
Install model:
ollama pull gpt-oss:20bInstall dependencies:
npm installCompile TypeScript:
npm run compileRun extension in development mode:
Press F5 in VS Code.
This opens a new Extension Development Host window.
Install VS Code packaging tool:
npm install -g @vscode/vsceCreate VSIX package:
vsce packageThis generates a .vsix file.
- Open Extensions
- Click
... - Select Install from VSIX
- Choose the
.vsixfile
First enable the code command:
- Open VS Code
- Press Cmd + Shift + P
- Run: Shell Command: Install ‘code’ command in PATH
code --install-extension ollama-commit-msg-0.0.1.vsix-
Make changes in your project
-
Trigger the command:
- Click AI Commit in the Source Control panel
- OR open the Command Palette (
Cmd + Shift + P) and search forAI Commit
-
Review or edit the generated message
-
Press Enter to commit
- Works fully locally (no external APIs)
- Uses
git diffas input - Large diffs are automatically truncated