Skip to main content

AI-powered commit message generator

Project description

commit-crafter-ai

An AI-powered commit message generator that uses either OpenAI's GPT models or Ollama's local models to create meaningful git commit messages.

Installation

pip install commit-crafter-ai

Setup

  1. Export your OpenAI API key:
# Linux/macOS
export OPENAI_API_KEY="your-api-key-here"

# Windows (Command Prompt)
set OPENAI_API_KEY=your-api-key-here

# Windows (PowerShell)
$env:OPENAI_API_KEY="your-api-key-here"
  1. The API key can also be added to your shell configuration file (~/.bashrc, ~/.zshrc, etc.) for persistence:
echo 'export OPENAI_API_KEY="your-api-key-here"' >> ~/.bashrc  # or ~/.zshrc

Usage

Craft a commit message and directly create a commit

Default client is OpenAI:

commit-crafter-ai craft

If you want to use Ollama with a specific model:

commit-crafter-ai craft --ollama 'model-name'

Craft a commit message and copy it to clipboard

If you want to copy the commit message to clipboard instead of directly creating a commit:

commit-crafter-ai craft --copy

Configuration

You can customize the commit message generation prompt by creating a craft.config file in your project root directory. If no config file is found, the default prompt will be used.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

commit_crafter_ai-1.4.5.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

commit_crafter_ai-1.4.5-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file commit_crafter_ai-1.4.5.tar.gz.

File metadata

  • Download URL: commit_crafter_ai-1.4.5.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.2

File hashes

Hashes for commit_crafter_ai-1.4.5.tar.gz
Algorithm Hash digest
SHA256 5ab85be492856af6c871978c5005deeb216b852082ccdb60b5fddaf7bb18a6bc
MD5 e5f270dbe62f6c53a3a5014a0da4df69
BLAKE2b-256 57a3c61f3c2a9b9c421c0ae320cec64397b7e63b987fceab903e99210b93eb99

See more details on using hashes here.

File details

Details for the file commit_crafter_ai-1.4.5-py3-none-any.whl.

File metadata

File hashes

Hashes for commit_crafter_ai-1.4.5-py3-none-any.whl
Algorithm Hash digest
SHA256 db5a1f18558cdb950d978fa9237f2a0d0d35613b080cf31a636bb6fb4b3a5377
MD5 a4797fd16a6c368d0a11caafea81cd7d
BLAKE2b-256 f26dfdf349d711beb8edb419fffbbdf0c4739cf9f4a84e96c8dd8d7028beedb3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page