https://github.com/vizzletf/commitsage
Commit Sage is a VSCode extension that automatically generates commit messages
https://github.com/vizzletf/commitsage
ai gemini git git-message llm openai vscode vscode-extension
Last synced: 7 days ago
JSON representation
Commit Sage is a VSCode extension that automatically generates commit messages
- Host: GitHub
- URL: https://github.com/vizzletf/commitsage
- Owner: VizzleTF
- License: mit
- Created: 2024-08-23T23:19:00.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-10-20T12:26:01.000Z (4 months ago)
- Last Synced: 2025-10-20T14:28:10.839Z (4 months ago)
- Topics: ai, gemini, git, git-message, llm, openai, vscode, vscode-extension
- Language: TypeScript
- Homepage: https://marketplace.visualstudio.com/items?itemName=VizzleTF.geminicommit
- Size: 6.01 MB
- Stars: 23
- Watchers: 1
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Commit Sage (formerly GeminiCommit)
[](https://deepwiki.com/VizzleTF/CommitSage)
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)

## Features
- π€ AI-powered commit message generation
- π Auto model selection for Gemini (tries available models until success)
- π Multiple language support (English, Russian, Chinese, Japanese, Spanish)
- π Various commit formats (Conventional, Angular, Karma, Semantic, Emoji, EmojiKarma)
- π Smart handling of staged/unstaged changes
- π Auto-commit and auto-push capabilities
- π― Custom instructions support
- β‘ Fast and efficient processing
## Configuration
Get your API key:
- For Gemini: Get it from [Google AI Studio](https://makersuite.google.com/app/apikey)
- For Codestral: [Mistral AI Console](https://console.mistral.ai/codestral)
- For custom endpoint: Use your OpenAI API key or other compatible service
### AI Provider Settings
- **Provider Selection** (`commitSage.provider.type`):
- Choose between: `gemini`, `openai`, `codestral`, `ollama`
- Default: `gemini`
- **Gemini Settings**:
- Model (`commitSage.gemini.model`):
- Options: `auto`, `gemini-2.0-pro-exp`, `gemini-2.0-flash`, `gemini-2.0-flash-exp`, `gemini-2.0-flash-thinking-exp`, `gemini-2.0-flash-lite`, `gemini-2.5-pro`, `gemini-2.5-flash`, `gemini-2.5-flash-lite`
- Default: `gemini-2.0-flash`
- **Auto Mode** (`auto`):
- Automatically fetches the list of available Gemini models from the API
- Tries each model sequentially until one succeeds
- Useful when you don't want to manually update model names or when specific models are unavailable
- Provides maximum reliability by automatically switching to working models
- **OpenAI Settings**:
- Model (`commitSage.openai.model`): Default `gpt-3.5-turbo`
- Base URL (`commitSage.openai.baseUrl`): For custom endpoints/Azure
- **Codestral Settings**:
- Model (`commitSage.codestral.model`):
- Options: `codestral-2405`, `codestral-latest`
- Default: `codestral-latest`
- **Ollama Settings**:
- Base URL (`commitSage.ollama.baseUrl`): Default `http://localhost:11434`
- Model (`commitSage.ollama.model`): Default `llama3.2`
### Commit Settings
- **Language** (`commitSage.commit.commitLanguage`):
- Options: `english`, `russian`, `chinese`, `japanese`, `spanish`
- Default: `english`
- **Format** (`commitSage.commit.commitFormat`):
- Options: `conventional`, `angular`, `karma`, `semantic`, `emoji`, `emojiKarma`, `google`, `atom`
- Default: `conventional`
- **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`
### Custom Instructions
- **Enable** (`commitSage.commit.useCustomInstructions`):
- Default: `false`
- **Instructions** (`commitSage.commit.customInstructions`):
- Custom prompt instructions
- Used when enabled
### Telemetry
- **Enable** (`commitSage.telemetry.enabled`):
- Collects anonymous usage data
- Default: `true`
## Project Configuration (.commitsage)
You can override extension settings for individual projects by creating a `.commitsage` file in your project root. This allows different projects to have different AI providers, commit formats, or other settings.
### Creating Project Configuration
1. Open Command Palette (`Ctrl+Shift+P` / `Cmd+Shift+P`)
2. Run "Commit Sage: Create Project Configuration (.commitsage)"
3. Edit the generated file with your project-specific settings
### Example .commitsage file:
```json
{
"provider": {
"type": "gemini"
},
"commit": {
"commitLanguage": "russian",
"commitFormat": "conventional",
"autoCommit": false,
"autoPush": false
},
"gemini": {
"model": "auto"
},
"telemetry": {
"enabled": false
}
}
```
### Settings Priority
Settings are loaded in the following order (higher priority overrides lower):
1. **Project settings** (`.commitsage` file) - Highest priority
2. **VS Code workspace settings** - Medium priority
3. **VS Code global settings** - Lowest priority
### Notes
- The `.commitsage` file 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
## Usage
1. Stage your changes in Git
2. Press `Cmd+G` (Mac) / `Ctrl+G` (Windows/Linux)
3. Or click the Commit Sage icon in the Source Control view
4. Wait for the AI to analyze changes and generate a message
5. Review and edit the message if needed
6. Commit as usual
## Requirements
- VSCode 1.93.0 or higher
- Git installed and configured
- Internet connection (except for Ollama)
- API key for OpenAI/Codestral (if using those providers)
## License
MIT
## Support
If you encounter any issues or have suggestions, please [open an issue](https://github.com/VizzleTF/CommitSage/issues).
---
# Commit Sage (Π½Π° ΡΡΡΡΠΊΠΎΠΌ)
Commit Sage - ΡΠ°ΡΡΠΈΡΠ΅Π½ΠΈΠ΅ VSCode Π΄Π»Ρ Π°Π²ΡΠΎΠΌΠ°ΡΠΈΡΠ΅ΡΠΊΠΎΠΉ Π³Π΅Π½Π΅ΡΠ°ΡΠΈΠΈ ΡΠΎΠΎΠ±ΡΠ΅Π½ΠΈΠΉ ΠΊΠΎΠΌΠΌΠΈΡΠΎΠ² Ρ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΠ΅ΠΌ Gemini AI ΠΎΡ Google, Codestral API ΠΈΠ»ΠΈ OpenAI API (OpenAI, Ollama, LocalAI ΠΈ Π΄ΡΡΠ³ΠΈΠ΅).
## Π£ΡΡΠ°Π½ΠΎΠ²ΠΊΠ°
1. Π£ΡΡΠ°Π½ΠΎΠ²ΠΈΡΠ΅ ΠΈΠ· [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=VizzleTF.commitsage)
2. ΠΠΎΠ»ΡΡΠΈΡΠ΅ API ΠΊΠ»ΡΡ:
- ΠΠ»Ρ Gemini: [Google AI Studio](https://makersuite.google.com/app/apikey)
- ΠΠ»Ρ Codestral: [Mistral AI Console](https://console.mistral.ai/codestral)
- ΠΠ»Ρ Π΄ΡΡΠ³ΠΈΡ
: ΠΡΠΏΠΎΠ»ΡΠ·ΡΠΉΡΠ΅ ΠΊΠ»ΡΡ ΠΎΡ OpenAI ΠΈΠ»ΠΈ Π΄ΡΡΠ³ΠΎΠ³ΠΎ ΡΠΎΠ²ΠΌΠ΅ΡΡΠΈΠΌΠΎΠ³ΠΎ ΡΠ΅ΡΠ²ΠΈΡΠ°
3. ΠΠ°ΡΡΡΠΎΠΉΡΠ΅ ΠΊΠ»ΡΡ Π² 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 ΠΊΠ»ΡΡ
## ΠΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΠ΅
1. ΠΠΎΠ±Π°Π²ΡΡΠ΅ ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΡ Π² Git (git add)
2. ΠΡΠΊΡΠΎΠΉΡΠ΅ ΠΏΠ°Π»ΠΈΡΡΡ ΠΊΠΎΠΌΠ°Π½Π΄ (Ctrl+Shift+P / Cmd+Shift+P)
3. ΠΠ²Π΅Π΄ΠΈΡΠ΅ "Commit Sage: Generate Commit Message"
4. ΠΡΠΎΠ²Π΅ΡΡΡΠ΅ ΠΈ ΠΏΠΎΠ΄ΡΠ²Π΅ΡΠ΄ΠΈΡΠ΅ ΡΠ³Π΅Π½Π΅ΡΠΈΡΠΎΠ²Π°Π½Π½ΠΎΠ΅ ΡΠΎΠΎΠ±ΡΠ΅Π½ΠΈΠ΅
## ΠΠ°ΡΡΡΠΎΠΉΠΊΠ°
ΠΡΠ΅ Π½Π°ΡΡΡΠΎΠΉΠΊΠΈ Π΄ΠΎΡΡΡΠΏΠ½Ρ ΡΠ΅ΡΠ΅Π·:
- ΠΠ°Π»ΠΈΡΡΠ° ΠΊΠΎΠΌΠ°Π½Π΄ β "Preferences: Open Settings (UI)"
- ΠΠΎΠΈΡΠΊ "Commit Sage"
## ΠΠΎΠ½ΡΠΈΠ³ΡΡΠ°ΡΠΈΡ ΠΏΡΠΎΠ΅ΠΊΡΠ° (.commitsage)
ΠΡ ΠΌΠΎΠΆΠ΅ΡΠ΅ ΠΏΠ΅ΡΠ΅ΠΎΠΏΡΠ΅Π΄Π΅Π»ΠΈΡΡ Π½Π°ΡΡΡΠΎΠΉΠΊΠΈ ΡΠ°ΡΡΠΈΡΠ΅Π½ΠΈΡ Π΄Π»Ρ ΠΎΡΠ΄Π΅Π»ΡΠ½ΡΡ
ΠΏΡΠΎΠ΅ΠΊΡΠΎΠ², ΡΠΎΠ·Π΄Π°Π² ΡΠ°ΠΉΠ» `.commitsage` Π² ΠΊΠΎΡΠ½Π΅ ΠΏΡΠΎΠ΅ΠΊΡΠ°. ΠΡΠΎ ΠΏΠΎΠ·Π²ΠΎΠ»ΡΠ΅Ρ ΡΠ°Π·Π½ΡΠΌ ΠΏΡΠΎΠ΅ΠΊΡΠ°ΠΌ ΠΈΠΌΠ΅ΡΡ ΡΠ°Π·Π½ΡΠ΅ ΠΏΡΠΎΠ²Π°ΠΉΠ΄Π΅ΡΡ ΠΠ, ΡΠΎΡΠΌΠ°ΡΡ ΠΊΠΎΠΌΠΌΠΈΡΠΎΠ² ΠΈΠ»ΠΈ Π΄ΡΡΠ³ΠΈΠ΅ Π½Π°ΡΡΡΠΎΠΉΠΊΠΈ.
### Π‘ΠΎΠ·Π΄Π°Π½ΠΈΠ΅ ΠΊΠΎΠ½ΡΠΈΠ³ΡΡΠ°ΡΠΈΠΈ ΠΏΡΠΎΠ΅ΠΊΡΠ°
1. ΠΡΠΊΡΠΎΠΉΡΠ΅ ΠΏΠ°Π»ΠΈΡΡΡ ΠΊΠΎΠΌΠ°Π½Π΄ (`Ctrl+Shift+P` / `Cmd+Shift+P`)
2. ΠΡΠΏΠΎΠ»Π½ΠΈΡΠ΅ "Commit Sage: Create Project Configuration (.commitsage)"
3. ΠΡΡΠ΅Π΄Π°ΠΊΡΠΈΡΡΠΉΡΠ΅ ΡΠΎΠ·Π΄Π°Π½Π½ΡΠΉ ΡΠ°ΠΉΠ» Ρ Π½Π°ΡΡΡΠΎΠΉΠΊΠ°ΠΌΠΈ Π΄Π»Ρ Π²Π°ΡΠ΅Π³ΠΎ ΠΏΡΠΎΠ΅ΠΊΡΠ°
### ΠΡΠΈΠΌΠ΅Ρ ΡΠ°ΠΉΠ»Π° .commitsage:
```json
{
"provider": {
"type": "gemini"
},
"commit": {
"commitLanguage": "russian",
"commitFormat": "conventional",
"autoCommit": false,
"autoPush": false
},
"gemini": {
"model": "auto"
},
"telemetry": {
"enabled": false
}
}
```
### ΠΡΠΈΠΎΡΠΈΡΠ΅Ρ Π½Π°ΡΡΡΠΎΠ΅ΠΊ
ΠΠ°ΡΡΡΠΎΠΉΠΊΠΈ Π·Π°Π³ΡΡΠΆΠ°ΡΡΡΡ Π² ΡΠ»Π΅Π΄ΡΡΡΠ΅ΠΌ ΠΏΠΎΡΡΠ΄ΠΊΠ΅ (Π±ΠΎΠ»Π΅Π΅ Π²ΡΡΠΎΠΊΠΈΠΉ ΠΏΡΠΈΠΎΡΠΈΡΠ΅Ρ ΠΏΠ΅ΡΠ΅ΠΎΠΏΡΠ΅Π΄Π΅Π»ΡΠ΅Ρ Π½ΠΈΠ·ΠΊΠΈΠΉ):
1. **ΠΠ°ΡΡΡΠΎΠΉΠΊΠΈ ΠΏΡΠΎΠ΅ΠΊΡΠ°** (ΡΠ°ΠΉΠ» `.commitsage`) - ΠΠ°ΠΈΠ²ΡΡΡΠΈΠΉ ΠΏΡΠΈΠΎΡΠΈΡΠ΅Ρ
2. **ΠΠ°ΡΡΡΠΎΠΉΠΊΠΈ ΡΠ°Π±ΠΎΡΠ΅ΠΉ ΠΎΠ±Π»Π°ΡΡΠΈ VS Code** - Π‘ΡΠ΅Π΄Π½ΠΈΠΉ ΠΏΡΠΈΠΎΡΠΈΡΠ΅Ρ
3. **ΠΠ»ΠΎΠ±Π°Π»ΡΠ½ΡΠ΅ Π½Π°ΡΡΡΠΎΠΉΠΊΠΈ VS Code** - ΠΠΈΠ·ΡΠΈΠΉ ΠΏΡΠΈΠΎΡΠΈΡΠ΅Ρ
### ΠΡΠΈΠΌΠ΅ΡΠ°Π½ΠΈΡ
- Π€Π°ΠΉΠ» `.commitsage` Π°Π²ΡΠΎΠΌΠ°ΡΠΈΡΠ΅ΡΠΊΠΈ ΠΎΡΡΠ»Π΅ΠΆΠΈΠ²Π°Π΅ΡΡΡ Π½Π° ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΡ
- ΠΠ΅Π²Π΅ΡΠ½ΡΠΉ JSON ΡΠΈΠ½ΡΠ°ΠΊΡΠΈΡ ΠΏΠΎΠΊΠ°ΠΆΠ΅Ρ ΡΠ²Π΅Π΄ΠΎΠΌΠ»Π΅Π½ΠΈΠ΅ ΠΎΠ± ΠΎΡΠΈΠ±ΠΊΠ΅
- API ΠΊΠ»ΡΡΠΈ ΠΏΠΎ-ΠΏΡΠ΅ΠΆΠ½Π΅ΠΌΡ ΡΠΏΡΠ°Π²Π»ΡΡΡΡΡ ΡΠ΅ΡΠ΅Π· Π·Π°ΡΠΈΡΠ΅Π½Π½ΠΎΠ΅ Ρ
ΡΠ°Π½ΠΈΠ»ΠΈΡΠ΅ VS Code (Π½Π΅ Ρ
ΡΠ°Π½ΡΡΡΡ Π² ΡΠ°ΠΉΠ»Π°Ρ
ΠΏΡΠΎΠ΅ΠΊΡΠ°)
- ΠΡ ΠΌΠΎΠΆΠ΅ΡΠ΅ ΠΏΠ΅ΡΠ΅ΠΎΠΏΡΠ΅Π΄Π΅Π»ΠΈΡΡ Π»ΡΠ±ΡΡ Π½Π°ΡΡΡΠΎΠΉΠΊΡ, Π΄ΠΎΡΡΡΠΏΠ½ΡΡ Π² ΠΊΠΎΠ½ΡΠΈΠ³ΡΡΠ°ΡΠΈΠΈ ΡΠ°ΡΡΠΈΡΠ΅Π½ΠΈΡ
## ΠΠΎΠ΄Π΄Π΅ΡΠΆΠΊΠ°
- [Telegram ΠΠ°Π½Π°Π»](https://t.me/geminicommit) - ΠΠ½ΠΎΠ½ΡΡ ΠΎΠ±Π½ΠΎΠ²Π»Π΅Π½ΠΈΠΉ
- [Telegram ΠΡΡΠΏΠΏΠ°](https://t.me/gemini_commit) - ΠΠ±ΡΡΠΆΠ΄Π΅Π½ΠΈΡ ΠΈ ΠΏΠΎΠ΄Π΄Π΅ΡΠΆΠΊΠ° ΡΠΎΠΎΠ±ΡΠ΅ΡΡΠ²Π°