CommitBrief

CommitBrief generates concise, meaningful, and professional Git commit messages from your changes using the official VS Code Language Model API (vscode.lm).
Say goodbye to vague commit messages like "updates" or "fixed stuff". CommitBrief inspects your diffs, filters out sensitive credential files, and drafts clean commit messages in seconds—without requiring external API keys, custom backend servers, or telemetry.
✨ Features
- Built with VS Code Language Model API (
vscode.lm): Integrates seamlessly with your active language model provider (GitHub Copilot, Claude, GPT-4o, etc.). No separate OpenAI or Anthropic API key needed.
- Smart Change Detection:
- Automatically prefers staged changes when you have prepared a commit.
- Automatically falls back to working-tree changes if nothing is staged yet.
- Dedicated command for staged-only generation.
- Sensitive File Shield:
- Automatically suppresses diff bodies for sensitive files (
.env*, *.pem, *.key, id_rsa*, *credentials*, *secret*, *token*, certificates, etc.).
- Keeps credentials private while keeping commit context accurate.
- Intelligent Diff Truncation:
- Gracefully bounds large diffs (default 12,000 characters) to prevent context overflows while preserving essential file change headers.
- Native & Frictionless Review UX:
- Review and edit the draft commit message right inside a native VS Code prompt.
- One-click actions:
- Insert into Source Control: Populates the Git commit input box ready for your workflow.
- Copy to Clipboard: Quick copy for custom git CLI usage.
- Commit Immediately: Executes git commit with explicit confirmation dialog.
- Configurable Styles:
- Conventional Commits (
feat(...), fix(...), refactor(...), etc.)
- Concise Imperative (single punchy sentence ≤ 72 chars)
- Detailed (headline + bulleted summary of key changes)
🚀 Getting Started
Prerequisites
- VS Code 1.90.0 or higher.
- An active VS Code Language Model provider (e.g., the official GitHub Copilot extension with Copilot Chat enabled).
Usage
- Make changes to your files in any Git repository.
- Trigger the command using either:
- Command Palette (
Ctrl+Shift+P / Cmd+Shift+P):
CommitBrief: Generate Commit Message
CommitBrief: Generate Commit Message from Staged Changes
- Source Control View: Click the sparkle icon (
$(sparkle)) on the Source Control title bar.
- Review and edit the generated message.
- Choose Insert into Source Control, Copy to Clipboard, or Commit Immediately.
⚙️ Configuration
Customize the extension via Settings (Ctrl+, or Cmd+,) under CommitBrief:
| Setting |
Type |
Default |
Description |
aiCommitWhisperer.messageStyle |
string |
"conventional" |
Commit style: "conventional", "concise", or "detailed". |
aiCommitWhisperer.maxDiffCharacters |
integer |
12000 |
Maximum diff length sent to the model before truncation (1,000 to 100,000). |
aiCommitWhisperer.preferredModelFamily |
string |
"" |
Optional model family (e.g. gpt-4o, claude-3.5-sonnet). Blank auto-selects best available. |
aiCommitWhisperer.includeBranchContext |
boolean |
false |
Includes current Git branch name in prompt for richer context. |
🔒 Privacy & Security
- Zero Telemetry: CommitBrief contains zero telemetry and zero external analytics.
- No Third-Party Backend: Diffs are passed directly to VS Code's internal language model subsystem (
vscode.lm). No data is sent to external servers or stored remotely.
- Credential Protection: Standard sensitive files (
.env*, private keys, secrets, tokens, SSH keys) have their contents automatically omitted from the prompt.
- Explicit Commit Confirmation: The extension will never commit changes without your explicit confirmation.
📄 License
This extension is licensed under the MIT License.
| |