Git Commit Message Master
A VS Code extension that generates Git commit messages using AI.
Features
- Generates commit messages based on your staged changes
- Integrates with VS Code's built-in Git extension
- Supports OpenAI compatible APIs
- Securely stores API keys using VS Code's SecretStorage
- Configurable model and API endpoint
Installation
- Install the extension from the VS Code Marketplace
- Configure your API key and other settings in the extension settings
Configuration
The extension can be configured through VS Code's settings:
gitCommitMessageGenerator.baseUrl : Base URL for the LLM API (default: 'https://api.openai.com/v1')
gitCommitMessageGenerator.modelId : Model ID to use for generating commit messages (default: 'gpt-3.5-turbo')
To set your API key, use the "Git Commit Message Master: Set API Key" command from the Command Palette.
Usage
- Stage your changes in Git
- Click the "Generate Commit Message" button in the Source Control view
- The generated commit message will appear in the commit message input box
Development
- Clone this repository
- Run
npm install to install dependencies
- Open the project in VS Code
- Press F5 to start debugging the extension
To build the extension:
npm run compile
To package the extension:
npm run package
To run tests:
npm test
Project Structure
├── src/
│ ├── extension.ts # Extension entry point
│ ├── git.d.ts # Git extension type definitions
│ ├── config/
│ │ └── configManager.ts # Configuration management
│ ├── services/
│ │ ├── gitService.ts # Git integration
│ │ └── llmService.ts # LLM communication
│ └── controllers/
│ └── uiController.ts # UI interactions
├── dist/ # Compiled extension
├── package.json # Extension manifest
├── tsconfig.json # TypeScript configuration
├── webpack.config.js # Webpack configuration
└── README.md # This file
Requirements
- VS Code version 1.74.0 or higher
- Git extension enabled in VS Code
- Access to an OpenAI compatible API
Security
API keys are stored securely using VS Code's SecretStorage API and are never written to disk or included in logs.
License
MIT
| |