Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>AI Commit HelperNew to Visual Studio Code? Get it now.
AI Commit Helper

AI Commit Helper

Chitresh Gyanani

|
1 install
| (0) | Free
Generate conventional commit messages using Groq from staged changes and optional context.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Commit Helper VS Code Extension

Commit Helper uses Groq's lightning-fast models to craft clean, conventional commit messages from your staged git changes. It mirrors the commit type cheat sheet so you can stay consistent without leaving the editor.

Features

  • Reads git status --short and the staged diff to understand your change.
  • Optional context prompt lets you tell the LLM why you made the change.
  • Calls Groq's Chat Completions API (default model llama-3.3-70b-versatile) to produce a ready-to-use commit message.
  • Copies the result to your clipboard and opens an untitled git-commit buffer for quick review.
  • Stores your Groq API key securely using VS Code's secret storage, with an option to persist in .vscode/commit-helper.json for the workspace.

Getting Started

  1. Install dependencies and build the extension:

    npm install
    npm run compile
    
  2. Launch the extension in VS Code:

    • Press F5 inside this repository to start the Extension Development Host.
  3. Set your Groq API key (once per machine/workspace):

    • Run the Commit Helper: Set Groq API Key command and paste a gsk_… key.
    • Accept the prompt to store it in .vscode/commit-helper.json if you want the whole workspace to reuse the key (note: stored in plaintext).
  4. Stage your git changes, then run Commit Helper: Generate Commit Message.

  5. (Optional) Update settings in VS Code:

    • commitHelper.model
    • commitHelper.temperature
    • commitHelper.maxCompletionTokens

Running Tests

The helper logic is covered with Mocha/Chai unit tests:

npm test

This command compiles TypeScript and runs the suite from out/test.

Configuration

Setting Description Default
commitHelper.model Groq model id used for completions. llama-3.3-70b-versatile
commitHelper.temperature Sampling temperature for the LLM. 0.2
commitHelper.maxCompletionTokens Max completion tokens requested. 300
commitHelper.persistKeyInWorkspace Automatically write the API key to .vscode/commit-helper.json (plaintext). false

Use Commit Helper: Clear Groq API Key if you need to rotate credentials. It removes the key from both secret storage and the workspace file (if present).

LLM Prompt Design

The extension sends the staged status, cached diff (trimmed to 12k characters), and any optional context you provide. The system prompt encodes the conventional commit rules from the included COMMIT_GUIDE.md, ensuring the LLM produces headers like feat(ui): add dark mode toggle with optional body/footers as needed.

Troubleshooting

  • “Groq API key is required” – Run Commit Helper: Set Groq API Key.
  • No staged changes – Stage files using git add before running the command.
  • Git errors – Ensure the workspace folder is a git repository with a valid git executable on your PATH.

License

MIT – tweak and share freely.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft