CommitSynth
AI-powered, repository-aware commit messages and PR descriptions — right inside VS Code.
---
CommitSynth reads your **staged git diff**, learns the style of your **recent commit history**, and writes commit messages and PR descriptions that actually sound like your team wrote them — no more staring at a blank commit box.
## ✨ Features
| | |
|---|---|
| 🧠 **AI Commit Messages** | Analyzes staged diffs and writes directly into your VS Code SCM input box. |
| 🎯 **Style Awareness** | Detects casing, length, and Conventional Commit usage from your last commits and matches it exactly. |
| 📝 **PR Description Webview** | Generates a structured Markdown PR description (Overview, Key Changes, Verification) in a styled Webview with one-click copy. |
| 🧩 **Heuristic Classifier Fallback** | Built-in rules classify change types (`feat`, `fix`, `refactor`, `test`, `docs`, `config`, `chore`) even without a live model call. |
## 🚀 Quick Start
1. Install the extension from the VS Code Marketplace.
2. Set your API key: `commitsynth.apiKey` (Command Palette → **Preferences: Open Settings**).
3. Stage some changes (`git add .`).
4. Click **✨** in the Source Control panel, or run **CommitSynth: Generate Commit Message**.
## 🖱️ How to Use
**Source Control (SCM) Toolbar**
- ✨ Sparkle icon — generate a commit message for staged changes
- 🔀 Pull Request icon — generate a PR description
**Status Bar**
- `✨ CommitSynth` — generate a commit message
- `🔀 PR Synth` — generate a PR description
**Command Palette** (`Ctrl+Shift+P` / `Cmd+Shift+P`)
- `CommitSynth: Generate Commit Message`
- `CommitSynth: Generate PR Description`
- `CommitSynth: Detect Git Repository`
- `CommitSynth: Show Git Status` / `Show Git Diff` / `Show Change Context`
## ⚙️ Settings
| Setting | Description | Default |
|---|---|---|
| `commitsynth.commitStyle` | `conventional` — strict Conventional Commits (`feat: add user login`). `history-based` — mimics your repo's own commit style. | `conventional` |
| `commitsynth.apiProvider` | LLM provider: `openrouter` or `anthropic`. | `openrouter` |
| `commitsynth.apiKey` | Your API key for the selected provider. | — |
| `commitsynth.model` | Override the default model or specify a comma-separated fallback chain (e.g. `anthropic/claude-3.5-sonnet, openai/gpt-4o`). | `anthropic/claude-3.5-sonnet` (OpenRouter) / `claude-3-5-sonnet-latest` (Anthropic) |
| `commitsynth.fallbackModels` | Ordered list of fallback models for OpenRouter. Automatically cascades to alternative models if the primary model hits token limits, rate limits, or errors. | `["anthropic/claude-3.5-sonnet", "openai/gpt-4o", "google/gemini-2.5-flash"]` |
| `commitsynth.apiEndpoint` | Custom proxy or base URL. | — |
## 🛠️ Requirements
- VS Code 1.124.0+
- Git installed and initialized in your workspace
- An API key from OpenRouter or Anthropic
## 🔒 Privacy & Data Usage
CommitSynth sends your **staged diff** and a small amount of repository context (recent commit messages, for style matching) to your configured LLM provider (OpenRouter or Anthropic) to generate suggestions. No code is stored or logged by CommitSynth itself, and nothing is sent unless you explicitly trigger a generation. Review your provider's data policy for how they handle API requests.
## 🐞 Known Issues
- Very large diffs may be truncated before being sent to the model.
- `history-based` style matching works best with 10+ prior commits in the repo.
- Submodules and detached-HEAD states aren't currently supported.
Found a bug? [Open an issue](https://github.com/NarendraReddy077/commitsynth/issues).
## 📄 License
Distributed under the MIT License. See [LICENSE](https://github.com/NarendraReddy077/commitsynth/blob/HEAD/LICENSE) for details.
Built by Narendra Reddy M