Open Commit
AI-powered commit message generator for VS Code.



Features
- 🤖 AI-Generated Commit Messages — automatically generates conventional commit messages from your code changes
- ⚡ Two Execution Modes:
- Direct API (fast) — HTTPS request straight to Zen API, bypassing Opencode CLI spawn. ~1-3s faster per generation
- Opencode CLI — fallback via
opencode run when no API key is configured
- 📝 Conventional Commits — follows the Conventional Commits specification (
feat(scope): subject)
- 🎯 Live Streaming — commit message appears in SCM inputBox in real-time as it's being generated
- 🛑 Cancellable — stop generation at any time
- 🌍 Multi-language Support — English and Russian
- 🆓 Free tier available — use free models via Opencode CLI when no API key is set
Requirements
- Fast mode: API key from opencode.ai (
open-commit.apiKey setting)
- Fallback mode: Opencode CLI installed in your system PATH
- Git repository initialized in your workspace
Installation
From VS Code Marketplace
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Search for "Open Commit"
- Click Install
From VSIX
- Download the latest
.vsix file from releases
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Click "..." menu → "Install from VSIX..."
- Select the downloaded file
Quick Start
Fastest way — configure an API key:
- Install the extension
- Open VS Code settings (Ctrl+,)
- Search for
open-commit.apiKey
- Paste your API key from opencode.ai
- Open Source Control (Ctrl+Shift+G) and click the generate button
Without an API key — the extension will automatically use Opencode CLI (must be installed separately).
Usage
Generate Commit Message
- Make changes to your code
- Open Source Control panel (Ctrl+Shift+G)
- Click the Open Commit icon in the SCM title bar
- Watch the commit message appear in real-time
- Review, edit if needed, and commit
Keyboard Shortcuts
- Generate commit message: Click Open Commit icon in Source Control
- Stop generation: Click stop icon during generation
Generated messages follow Conventional Commits:
<type>(<scope>): <subject>
Types:
feat — New feature
fix — Bug fix
docs — Documentation
style — Code style changes
refactor — Code refactoring
perf — Performance improvements
test — Tests
chore — Maintenance tasks
Example:
feat(auth): add JWT token validation
Configuration
| Setting |
Default |
Description |
open-commit.apiKey |
"" |
API key for direct HTTPS calls to Zen API. Recommended — fastest mode, no Opencode CLI required |
open-commit.model |
"" |
Opencode model (auto-detected if empty). Used in fallback CLI mode only |
open-commit.variant |
"minimal" |
Variant: minimal, high, max. Used in fallback CLI mode only |
open-commit.timeout |
60 |
Timeout in seconds |
open-commit.maxDiffSize |
500000 |
Maximum diff size in characters before truncation |
Environment Variables
OPENCODE_API_KEY — overrides open-commit.apiKey
OPENCODE_PATH — path to Opencode CLI (default: opencode)
OPENCODE_MODEL — overrides open-commit.model
OPENCODE_VARIANT — overrides open-commit.variant
How It Works
Generate button pressed
│
▼
Read configuration
│
├── apiKey set? ──► Direct HTTPS to Zen API (opencode.ai)
│ (fast, no process spawn)
│
└── apiKey empty? ──► spawn(`opencode run --format json`)
(fallback, requires CLI installed)
│
▼
Commit message streams into SCM inputBox
│
▼
User reviews, edits, and commits
Troubleshooting
"API error 401"
Invalid or missing API key. Check the open-commit.apiKey setting.
"Opencode not found"
Opencode CLI is not installed and no API key is set. Either install Opencode or configure open-commit.apiKey:
npm i -g opencode-ai
"No changes to commit"
Make sure you have uncommitted changes in your Git repository.
"Git extension not found"
Ensure VS Code's built-in Git extension is enabled.
Development
Prerequisites
- Node.js 18+ and npm
- VS Code
Setup
git clone https://github.com/anomalyco/open-commit.git
cd open-commit
npm install
Build
npm run compile # Compile TypeScript
npm run watch # Watch mode
npm run package # Create VSIX package
npm run install:ext # Build and install locally
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT
Credits
Powered by Opencode AI.