Commit Sage is a VSCode extension that automatically generates commit messages using various AI providers:
- Gemini (default, requires API key, free tier)
- OpenRouter (300+ models behind one key, free-tier models available)
- Groq (fast inference, generous free tier)
- Anthropic Claude (requires API key)
- OpenAI (requires API key)
- DeepSeek (works without VPN in restricted regions)
- xAI Grok (requires API key)
- Codestral (requires API key, free tier)
- Ollama (local, free, no key)
- Custom OpenAI-compatible — LM Studio, vLLM, llama.cpp, LocalAI, Together AI, Fireworks, any self-hosted endpoint
- 🤖 AI-powered commit message generation
- 🔄 Auto model selection for Gemini (tries available models until success)
- 🌍 Multiple language support (English, Russian, Chinese, Japanese, Korean, German, French, Spanish, Portuguese)
- 📝 Various commit formats (Conventional, Angular, Karma, Semantic, Emoji, EmojiKarma, Google, Atom)
- 🔄 Smart handling of staged/unstaged changes
- 🚀 Auto-commit and auto-push capabilities
- 🎯 Custom instructions support
- ⚡ Fast and efficient processing
The fastest way is the Commit Sage sidebar (Activity Bar icon): pick a provider, paste an API key, and the model dropdown is populated live from each provider's /models endpoint.
Where to get keys:
- Gemini — Google AI Studio
- OpenRouter — openrouter.ai/keys (one key → 300+ models)
- Groq — console.groq.com/keys
- Anthropic — console.anthropic.com/settings/keys
- OpenAI — platform.openai.com/api-keys
- DeepSeek — platform.deepseek.com/api_keys
- xAI — console.x.ai
- Codestral — Mistral AI Console
- Ollama — no key needed (local)
- Custom — depends on your endpoint; key is optional
-
Provider Selection (
commitSage.provider.type):- Choose between:
gemini,openrouter,groq,anthropic,openai,deepseek,xai,codestral,ollama,custom - Default:
gemini
- Choose between:
-
Gemini — Model (
commitSage.gemini.model): defaultauto(recommended). Auto mode fetches the live model list from the API and tries each sequentially until one succeeds — robust to model deprecations. -
OpenRouter — Model (
commitSage.openrouter.model): defaultmeta-llama/llama-3.3-70b-instruct:free. TogglecommitSage.openrouter.preferFreeModelsto filter the model picker to free models only (defaulttrue). -
Groq — Model (
commitSage.groq.model): defaultllama-3.3-70b-versatile. Free tier covers ~14 400 RPD onllama-3.1-8b-instant. -
Anthropic — Model (
commitSage.anthropic.model): defaultclaude-sonnet-4-5-20250929. Anthropic has no public/modelsendpoint, so the dropdown is a curated static list — see docs/providers.md for current options. -
OpenAI — Model (
commitSage.openai.model) + Base URL (commitSage.openai.baseUrl, change only for Azure or another OpenAI-compatible deployment). -
DeepSeek — Model (
commitSage.deepseek.model): defaultdeepseek-chat. -
xAI — Model (
commitSage.xai.model): defaultgrok-2-1212. -
Codestral — Model (
commitSage.codestral.model): defaultcodestral-latest. -
Ollama:
- Base URL (
commitSage.ollama.baseUrl): defaulthttp://localhost:11434 - Model (
commitSage.ollama.model): defaultllama3.2 - Auth token (
commitSage.ollama.useAuthToken): off by default; enable for hosted Ollama instances behind auth.
- Base URL (
-
Custom OpenAI-compatible:
- Base URL (
commitSage.custom.baseUrl): e.g.http://localhost:1234/v1(LM Studio),http://localhost:8000/v1(vLLM),https://api.together.xyz/v1 - Model (
commitSage.custom.model): free-form ID your endpoint exposes - Send API key (
commitSage.custom.useApiKey): off by default; enable for endpoints that require auth - Path (
commitSage.custom.chatCompletionsPath): default/chat/completions
- Base URL (
-
Language (
commitSage.commit.commitLanguage):- Options:
english,russian,chinese,japanese,korean,german,french,spanish,portuguese - Default:
english
- Options:
-
Format (
commitSage.commit.commitFormat):- Options:
conventional,angular,karma,semantic,emoji,emojiKarma,google,atom - Default:
conventional
- Options:
-
Staged Changes (
commitSage.commit.onlyStagedChanges):- When enabled: Only analyzes staged changes
- When disabled:
- Uses staged changes if present
- Uses all changes if no staged changes
- Default:
false
-
Auto Commit (
commitSage.commit.autoCommit):- Automatically commits after message generation
- Default:
false
-
Auto Push (
commitSage.commit.autoPush):- Automatically pushes after auto-commit
- Requires Auto Commit to be enabled
- Default:
false
-
References (
commitSage.commit.promptForRefs):- Prompts for issue/PR references
- Default:
false
-
Enable (
commitSage.commit.useCustomInstructions):- Default:
false
- Default:
-
Instructions (
commitSage.commit.customInstructions):- Custom prompt instructions
- Used when enabled
- Enable (
commitSage.telemetry.enabled):- Collects anonymous usage data
- Default:
true
You can override extension settings for individual projects by creating a .commitsage/config.json file in your project root. This allows different projects to have different AI providers, commit formats, or other settings.
Legacy single-file
.commitsageconfigurations are still loaded and are automatically migrated to.commitsage/config.jsonon next activation.
- Open Command Palette (
Ctrl+Shift+P/Cmd+Shift+P) - Run "Commit Sage: Create Project Config (.commitsage)"
- Edit the generated
.commitsage/config.jsonwith your project-specific settings
{
"provider": {
"type": "gemini"
},
"commit": {
"commitLanguage": "russian",
"commitFormat": "conventional",
"autoCommit": false,
"autoPush": false
},
"gemini": {
"model": "auto"
},
"telemetry": {
"enabled": false
}
}Settings are loaded in the following order (higher priority overrides lower):
- Project settings (
.commitsage/config.json) - Highest priority - VS Code workspace settings - Medium priority
- VS Code global settings - Lowest priority
- The
.commitsage/config.jsonfile is automatically watched for changes - Invalid JSON syntax will show an error notification
- API keys are still managed through VS Code's secure storage (not stored in project files)
- You can override any setting available in the extension configuration
- Stage your changes in Git
- Open the Source Control view (Ctrl+Shift+G / Cmd+Shift+G), then press
Ctrl+G(Windows/Linux) /Cmd+G(Mac) — the keybinding is scoped to the SCM view to avoid clashing with editor shortcuts - Or click the Commit Sage icon in the Source Control view
- Or run "Commit Sage: Generate Commit Message" from the Command Palette (works from anywhere)
- Wait for the AI to analyze changes and generate a message
- Review and edit the message if needed
- Commit as usual
- VSCode 1.93.0 or higher
- Git installed and configured
- Internet connection (except for Ollama and self-hosted Custom endpoints)
- API key for the selected cloud provider (none for Ollama, optional for Custom)
Detailed guides are available in the docs/ directory:
- Providers — setup and comparison of all AI providers
- Configuration Reference — all settings with defaults
- Commit Formats — format descriptions and examples
- Troubleshooting — common errors and solutions
- Adding a Provider — contributor guide
- Adding a Language — contributor guide
- Adding a Format — contributor guide
- Testing — running unit + E2E tests, mock LLM, adding new tests
- API keys are stored in VS Code's secure storage (OS keychain), never in plain text files
- Code changes are sent to the selected AI provider for analysis — do not use cloud providers on repositories containing secrets
- Ollama runs locally — no data leaves your machine
- Telemetry collects anonymous usage events (provider type, errors) to help improve the extension; disable via
commitSage.telemetry.enabled: false
MIT
If you encounter any issues or have suggestions, please open an issue.
For troubleshooting common problems, see docs/troubleshooting.md.
Commit Sage — расширение VSCode для автоматической генерации commit-сообщений через AI-провайдеров: Gemini, OpenRouter, Groq, Anthropic Claude, OpenAI, DeepSeek, xAI Grok, Codestral, локальный Ollama или любой OpenAI-совместимый endpoint (LM Studio, vLLM, llama.cpp, Together, Fireworks).
Для пользователей из РФ без VPN рабочие варианты: DeepSeek, Ollama локально, Custom (свой self-hosted endpoint).
- Установите из VS Code Marketplace
- Откройте sidebar Commit Sage (иконка в Activity Bar) — там выбор провайдера, ввод ключа и live-список моделей в одном окне
- Альтернатива через палитру команд:
Commit Sage: Set Gemini API KeyCommit Sage: Set OpenRouter API KeyCommit Sage: Set Groq API KeyCommit Sage: Set Anthropic API KeyCommit Sage: Set DeepSeek API KeyCommit Sage: Set xAI API KeyCommit Sage: Set OpenAI API KeyCommit Sage: Set Codestral API KeyCommit Sage: Set Ollama Auth TokenCommit Sage: Set Custom API Key
Где получить ключи:
- Gemini → Google AI Studio
- OpenRouter → openrouter.ai/keys
- Groq → console.groq.com/keys
- Anthropic → console.anthropic.com/settings/keys
- OpenAI → platform.openai.com/api-keys
- DeepSeek → platform.deepseek.com/api_keys
- xAI → console.x.ai
- Codestral → console.mistral.ai/codestral
- Добавьте изменения в Git (git add)
- Откройте палитру команд (Ctrl+Shift+P / Cmd+Shift+P)
- Введите "Commit Sage: Generate Commit Message"
- Проверьте и подтвердите сгенерированное сообщение
Все настройки доступны через:
- Палитра команд → "Preferences: Open Settings (UI)"
- Поиск "Commit Sage"
Вы можете переопределить настройки расширения для отдельных проектов, создав файл .commitsage/config.json в корне проекта. Это позволяет разным проектам иметь разные провайдеры ИИ, форматы коммитов или другие настройки.
Старый одиночный файл
.commitsageвсё ещё поддерживается и автоматически мигрируется в.commitsage/config.jsonпри следующей активации расширения.
- Откройте палитру команд (
Ctrl+Shift+P/Cmd+Shift+P) - Выполните "Commit Sage: Create Project Config (.commitsage)"
- Отредактируйте созданный
.commitsage/config.jsonс настройками для вашего проекта
{
"provider": {
"type": "gemini"
},
"commit": {
"commitLanguage": "russian",
"commitFormat": "conventional",
"autoCommit": false,
"autoPush": false
},
"gemini": {
"model": "auto"
},
"telemetry": {
"enabled": false
}
}Настройки загружаются в следующем порядке (более высокий приоритет переопределяет низкий):
- Настройки проекта (файл
.commitsage/config.json) - Наивысший приоритет - Настройки рабочей области VS Code - Средний приоритет
- Глобальные настройки VS Code - Низший приоритет
- Файл
.commitsage/config.jsonавтоматически отслеживается на изменения - Неверный JSON синтаксис покажет уведомление об ошибке
- API ключи по-прежнему управляются через защищенное хранилище VS Code (не хранятся в файлах проекта)
- Вы можете переопределить любую настройку, доступную в конфигурации расширения
- Telegram Канал - Анонсы обновлений
- Telegram Группа - Обсуждения и поддержка сообщества

