| Crates.io | jcommit |
| lib.rs | jcommit |
| version | 0.1.13 |
| created_at | 2025-02-16 04:01:51.142005+00 |
| updated_at | 2025-03-03 02:19:08.864609+00 |
| description | An AI-powered tool to generate git commit messages |
| homepage | |
| repository | https://github.com/race604/jcommit |
| max_upload_size | |
| id | 1557311 |
| size | 72,626 |
An AI-powered tool to generate git commit messages using OpenAI's GPT models.
cargo install jcommit
Before using jcommit, you need to set up your OpenAI API key. You can do this by either:
OPENAI_API_KEY environment variable~/.jcommit.toml with your API keyExample configuration file:
# OpenAI API key (or Azure OpenAI API key)
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:
is_azure = true in the configurationapi_endpointapi_keyapi_version# Generate commit message for staged changes
jcommit
# Include additional hints
jcommit -m "Fix login bug"
# Include commit message body
jcommit -b
# Commit changes directly
jcommit -c
# Specify repository path
jcommit -p /path/to/repo
# Generate commit message based on changes between branches or commits
jcommit -s main # Compare with main branch
jcommit -s HEAD~1 # Compare with previous commit
jcommit -s v1.0.0 # Compare with a tag
This project is licensed under the MIT License - see the LICENSE file for details.