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

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.

Features

  • Generates clear and concise commit messages
  • Follows conventional commit format
  • Provides detailed descriptions of changes
  • Easy to use command-line interface

Requirements

  • Python 3.7+
  • OpenAI API key

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

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.1.tar.gz (4.7 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.1-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: commit_crafter_ai-1.4.1.tar.gz
  • Upload date:
  • Size: 4.7 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.1.tar.gz
Algorithm Hash digest
SHA256 04385a199aefc91d3b0f92036892fed7d00b000dd4a02e01daf23b86684e691e
MD5 64a6391e810f54f1ae82bebdda5456d1
BLAKE2b-256 a164ccb2c6a275519c758494009138c0725dd40cd075f5d2d276a8339cee67f0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for commit_crafter_ai-1.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 56815aefe323a6675606347e511e8ff25a3457de820b7a6952592ee11e5cb793
MD5 476754eda99fcd8c0eccce0b8ed0a546
BLAKE2b-256 10817c910e60e415d4a2045e97967a7f89621806584f20e1a3b01b1e14517d22

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