jcommit-0.1.11 is not a library.
jcommit
An AI-powered tool to generate git commit messages using OpenAI's GPT models.
Features
- Automatically generates meaningful commit messages based on staged changes
- Supports custom hints to guide message generation
- Optional commit message body generation
- Direct commit option available
- Configurable OpenAI API endpoint and model
- Generate commit message based on changes between branches/commits
Installation
Configuration
Before using jcommit, you need to set up your OpenAI API key. You can do this by either:
- Setting the
OPENAI_API_KEY
environment variable - Creating a configuration file at
~/.jcommit.toml
with your API key
Example configuration file:
# OpenAI API key (or Azure OpenAI API key)
= "your-api-key-here"
# Optional: Custom API endpoint (for Azure OpenAI, use your deployment endpoint)
# api_endpoint = "https://api.openai.com/v1"
# Optional: Custom model name
# model = "gpt-3.5-turbo"
# Optional: Enable Azure OpenAI API
# is_azure = false
# Optional: Azure OpenAI API version
# api_version = "2023-05-15"
For Azure OpenAI Service users:
- Set
is_azure = true
in the configuration - Use your Azure OpenAI deployment endpoint as
api_endpoint
- Use your Azure OpenAI API key as
api_key
- Optionally specify the API version using
api_version
Usage
# Generate commit message for staged changes
# Include additional hints
# Include commit message body
# Commit changes directly
# Specify repository path
# Generate commit message based on changes between branches or commits
License
This project is licensed under the MIT License - see the LICENSE file for details.