Commit Message Agent
A small VS Code extension that reads your Git changes and writes a polished commit message.
Commands
Commit Agent: Generate Commit Message
- Uses staged changes first by default.
- Falls back to unstaged working tree changes when nothing is staged.
Commit Agent: Generate Commit Message From Staged Changes
- Only reads staged changes.
The generated message is written into the Git commit input box when the built-in Git extension is available. It is also copied to the clipboard.
How It Works
The extension uses Groq's OpenAI-compatible API with openai/gpt-oss-120b by default. Run Commit Agent: Set Groq API Key once to save your key in VS Code Secret Storage.
If no Groq key is configured, the extension tries VS Code's Language Model API when a compatible provider is enabled. If no model is available, it creates a basic Conventional Commit style message from git status and file paths.
Local Development
- Open this folder in VS Code.
- Press
F5 to launch an Extension Development Host.
- Open a Git repository in that host window.
- Run
Commit Agent: Set Groq API Key from the command palette.
- Run
Commit Agent: Generate Commit Message from the command palette.
No npm install step is required for local testing. The extension uses only VS Code APIs and Node built-ins.
To package a .vsix later, install VSCE separately and run it from this folder:
npx @vscode/vsce package
Publishing With Microsoft Entra ID
This repo includes azure-pipelines.yml for PAT-free publishing.
Before running it:
- Create an Azure DevOps service connection that uses Workload Identity Federation.
- Create or select a managed identity in Microsoft Entra ID.
- Add that identity as a member of the Visual Studio Marketplace publisher
prasannaarjun with Contributor access.
- Update
azureServiceConnection in azure-pipelines.yml.
- Run the pipeline manually.
The publish step uses:
npx --yes @vscode/vsce publish --azure-credential
Settings
commitAgent.preferStagedChanges: Use staged changes before unstaged changes.
commitAgent.commitStyle: Use conventional or plain message style.
commitAgent.maxDiffCharacters: Limit diff size sent to the language model.
commitAgent.groqModel: Groq model name. Defaults to openai/gpt-oss-120b.