A modern VS Code extension that helps you write better commit messages with ease and consistency.
Built with Svelte + TypeScript + Tailwind CSS for optimal performance, maintainability, and developer experience.
- Conventional Commits compliant form with type, scope, description, body, and footer fields
- Smart type selector with predefined commit types (feat, fix, docs, etc.)
- AI-powered generation for scope and body fields
- Custom flags system for additional metadata
- Pure text editor for those who prefer writing commit messages directly
- Auto-growing textarea that adapts to content length
- Flag integration that works seamlessly with text mode
- OpenAI & Google AI support for intelligent commit message generation
- Context-aware suggestions based on your code changes
- Configurable AI models (GPT-4, GPT-3.5, Gemini Pro, etc.)
- Field-specific generation for targeted assistance
- VS Code theme integration - perfectly matches your editor's appearance
- Responsive design that works on different screen sizes
- Real-time preview of your final commit message
- Intuitive tabbed interface for easy mode switching
- Auto-save functionality - never lose your work
- Session persistence across VS Code restarts
- Workspace-specific settings for team consistency
Ctrl+Enter
/Cmd+Enter
- Save commitEscape
- Cancel and close- Full keyboard navigation support
- From VS Code Marketplace: Search for "Commit Assistant" in the Extensions view (
Ctrl+Shift+X
) - From Command Line:
code --install-extension sunzhongyi.commit-assistant
- Open the Assistant: Click the "Assistant" button in the Source Control panel
- Choose your mode:
- Form Mode: Fill out structured fields for conventional commits
- Text Mode: Write commit messages in free text format
- Flags Mode: Configure custom flags for your workflow
- Use AI assistance: Click the AI trigger buttons for intelligent suggestions
- Save your commit: Press
Ctrl+Enter
or click the Save button
You can configure AI providers in VS Code settings in GUI way.
Customize available commit types:
{
"commitAssistant.commitTypes": [
{
"value": "feat",
"label": "feat",
"description": "A new feature"
},
{
"value": "fix",
"label": "fix",
"description": "A bug fix"
}
// ... more types
]
}
Structured form with conventional commit fields and AI assistance
Free text editor with auto-growing textarea and flag support
Comprehensive settings for AI configuration and commit types
commit-assistant/
βββ webviews/
β βββ commit-editor/ # π Main commit editor
β β βββ components/ # Svelte components
β β βββ App.svelte # Main app component
β β βββ main.ts # Entry point
β βββ settings/ # βοΈ Settings panel
βββ extension.ts # π VS Code extension logic
βββ rollup.config.mjs # π οΈ Build configuration
βββ package.json # π¦ Extension manifest
- π Svelte: Compile-time optimized, minimal runtime overhead
- π TypeScript: Full type safety across the entire codebase
- π¨ Tailwind CSS: Utility-first styling with VS Code theme integration
- π€ AI SDK: Unified interface for multiple AI providers
- β‘ Rollup: Optimized bundling for webview components
- Node.js 18+
- VS Code 1.70+
- Git
# Clone the repository
git clone https://github.com/joisun/commit-assistant.git
cd commit-assistant
# Install dependencies
npm install
# Build the extension
npm run build
# Start TypeScript compiler in watch mode
npm run watch
# In another terminal, start webview build in watch mode
npm run build:watch
# Press F5 in VS Code to launch Extension Development Host
# Run tests (if available)
npm test
# Package extension for testing
npm run package
We welcome contributions! Please see our Contributing Guide for details.
- Code Style: We use TypeScript strict mode and Prettier for formatting
- Commits: Follow conventional commit format that this extension helps create!
- Testing: Add tests for new features and bug fixes
- Documentation: Update README and inline docs for any changes
This project is licensed under the MIT License - see the LICENSE file for details.
- Conventional Commits specification for commit message standards
- Svelte team for the amazing compile-time framework
- VS Code team for the excellent extension API
- OpenAI and Google for AI capabilities
Start writing better commits today! π