Generate clear, consistent, and expressive Git commit messages from your staged changes — powered by OpenAI.
AI Commit Assistant is a Visual Studio Code extension that helps you craft meaningful commit messages directly from your staged Git changes.
It analyzes your diff, detects relevant changes, and proposes commit messages following Conventional Commits — optionally with emojis 🎨.
You can also refine existing commit messages with simple instructions like “make it shorter” or “add bullet points.”
- 🤖 AI-powered commit message generation (via OpenAI or custom HTTP endpoint)
- 🧩 Conventional Commits format support
- 😎 Optional emoji prefixes (✨ feat, 🐛 fix, etc.)
- 🔒 Secret redaction before sending diffs
- 🧠 Refine mode: improve or reformat an existing commit message
- ⚙️ Customizable provider & model (OpenAI, Azure, or custom endpoint)
| Command | Description |
|---|---|
AI Commit: Generate from staged changes |
Generate a commit message from the current staged diff |
AI Commit: Refine current message |
Improve the current commit message |
AI Commit Assistant: Set OpenAI API Key |
Store your OpenAI API key securely |
AI Commit Assistant: Clear OpenAI API Key |
Delete the stored API key from VS Code SecretStorage |
Clone this repo and open it in VS Code, then press F5 to launch in an Extension Development Host.
pnpm install
pnpm run compileRun the command:
AI Commit Assistant: Set OpenAI API Key🔒 The key is stored securely in VS Code’s Secret Storage and never committed.
git add .AI Commit: Generate from staged changesSelect Insert or Preview to view the message before applying it.
| Scenario | Example Output |
|---|---|
| Add new feature | ✨ feat(auth): add OAuth2 login flow |
| Fix a bug | 🐛 fix(validation): correct email regex handling |
| Refactor logic | ♻️ refactor(core): simplify async pipeline |
| Docs update | 📝 docs: update contributing guide |
| Performance improvement | ⚡ perf(api): reduce response latency by caching results |
| Chore / CI update | 🧹 chore(ci): add lint check to GitHub Actions |