Commit Sage is a VSCode extension that automatically generates commit messages using various AI providers:
- Gemini (default, requires API key, free)
- OpenAI (requires API key or compatible provider)
- Codestral (requires API key, free)
- Ollama (local, free)
- 🤖 AI-powered commit message generation
- 🌍 Multiple language support (English, Russian, Chinese, Japanese)
- 📝 Various commit formats (Conventional, Angular, Karma, Semantic, Emoji)
- 🔄 Smart handling of staged/unstaged changes
- 🚀 Auto-commit and auto-push capabilities
- 🎯 Custom instructions support
- ⚡ Fast and efficient processing
Get your API key:
- For Gemini: Get it from Google AI Studio
- For Codestral: Mistral AI Console
- For custom endpoint: Use your OpenAI API key or other compatible service
-
Provider Selection (
commitSage.provider.type
):- Choose between:
gemini
,openai
,codestral
,ollama
- Default:
gemini
- Choose between:
-
Gemini Settings:
- Model (
commitSage.gemini.model
):- Options:
gemini-1.0-pro
,gemini-1.5-pro
,gemini-1.5-flash
,gemini-2.0-flash-exp
- Default:
gemini-1.5-flash
- Options:
- Model (
-
OpenAI Settings:
- Model (
commitSage.openai.model
): Defaultgpt-3.5-turbo
- Base URL (
commitSage.openai.baseUrl
): For custom endpoints/Azure
- Model (
-
Codestral Settings:
- Model (
commitSage.codestral.model
):- Options:
codestral-2405
,codestral-latest
- Default:
codestral-latest
- Options:
- Model (
-
Ollama Settings:
- Base URL (
commitSage.ollama.baseUrl
): Defaulthttp://localhost:11434
- Model (
commitSage.ollama.model
): Defaultllama3.2
- Base URL (
-
Language (
commitSage.commit.commitLanguage
):- Options:
english
,russian
,chinese
,japanese
- Default:
english
- Options:
-
Format (
commitSage.commit.commitFormat
):- Options:
conventional
,angular
,karma
,semantic
,emoji
- 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
- Stage your changes in Git
- Press
Cmd+G
(Mac) /Ctrl+G
(Windows/Linux) - Or click the Commit Sage icon in the Source Control view
- 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)
- API key for OpenAI/Codestral (if using those providers)
MIT
If you encounter any issues or have suggestions, please open an issue.
Commit Sage - расширение VSCode для автоматической генерации сообщений коммитов с использованием Gemini AI от Google, Codestral API или OpenAI API (OpenAI, Ollama, LocalAI и другие).
- Установите из VS Code Marketplace
- Получите API ключ:
- Для Gemini: Google AI Studio
- Для Codestral: Mistral AI Console
- Для других: Используйте ключ от OpenAI или другого совместимого сервиса
- Настройте ключ в VS Code:
- Откройте палитру команд (Ctrl+Shift+P / Cmd+Shift+P)
- Введите "Commit Sage: Set Gemini API Key", "Commit Sage: Set Codestral API Key" или "Commit Sage: Set Custom API Key"
- Введите ваш API ключ
- Добавьте изменения в Git (git add)
- Откройте палитру команд (Ctrl+Shift+P / Cmd+Shift+P)
- Введите "Commit Sage: Generate Commit Message"
- Проверьте и подтвердите сгенерированное сообщение
Все настройки доступны через:
- Палитра команд → "Preferences: Open Settings (UI)"
- Поиск "Commit Sage"
- Telegram Канал - Анонсы обновлений
- Telegram Группа - Обсуждения и поддержка сообщества