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 ΠΡΡΠΏΠΏΠ° - ΠΠ±ΡΡΠΆΠ΄Π΅Π½ΠΈΡ ΠΈ ΠΏΠΎΠ΄Π΄Π΅ΡΠΆΠΊΠ° ΡΠΎΠΎΠ±ΡΠ΅ΡΡΠ²Π°