Skip to main content

Generate clean git commit messages from files or AI

Project description

CommitWise

CommitWise is a smart and simple tool for generating clean Git commit messages. It can create commit messages from a text file or using AI models.

With CommitWise, your commits are always:

  • Clean and readable
  • Following Git best practices
  • Well-structured and informative

Features

  • Generate commits from text files, preserving exact formatting, spacing, and paragraphs

  • Generate commits using AI (local with Ollama or OpenAI API)

  • Simple and easy-to-use CLI with only a few flags

  • Works seamlessly in any Git project


Requirements

  • Python >= 3.9

  • For local AI : Ollama installed and the desired model downloaded

  • For online AI : OpenAI API Key (if using OpenAI)


Installation

$> pip install commitwise

AI Configuration

CommitWise supports two AI modes:

  • Local AI using Ollama (recommended)

  • OpenAI API

You only need to configure ONE of them.


Local AI (Ollama)

  1. Install Ollama: https://ollama.com

  2. Download a model :

    $> ollama pull llama3
    
  3. Make sure Ollama is running:

    $> ollama serve
    

CommitWise will automatically detect Ollama at : http://localhost:11434

No additional configuration is required.


OpenAI Configuration

  • If you prefer using OpenAI instead of local AI, set your API-KEY as an environment variable.

    • Windows :

       $> setx OPENAI_API_KEY "your_api_key_here"
      
    • Linux / macOS :

      $> export OPENAI_API_KEY="your_api_key_here"
      

CommitWise will automatically use OpenAI when the API key is available.


Usage

Generate commit from AI (local or OpenAI):

$> commitwise --ai

Generate commit from a text file:

$> commitwise --file ./my_commit.txt

Show help:

$> commitwise --help

Professional Note

CommitWise ensures that AI-generated commit messages are clean and Git-ready, without extra explanations, markdown, or educational text. This is guaranteed through strict prompting and output cleaning.


Links

GitHub | PyPi


Support

If CommitWise is helpful, please give it a star on GitHub so others can find it!


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

commitwise-0.1.6.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

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

commitwise-0.1.6-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file commitwise-0.1.6.tar.gz.

File metadata

  • Download URL: commitwise-0.1.6.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for commitwise-0.1.6.tar.gz
Algorithm Hash digest
SHA256 921bfd2ce6ccd7f618891bdedbcf316a1afd522c7f7fbeaac52a668b4430ef87
MD5 a80940c29f7bbe7a34816a2c4b23627c
BLAKE2b-256 2c2f816b7f783f925be92b321416a5e679a8bbcafeafd48ad322c41265d73a7e

See more details on using hashes here.

Provenance

The following attestation bundles were made for commitwise-0.1.6.tar.gz:

Publisher: release.yml on hasssan-hasssan/commitwise

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file commitwise-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: commitwise-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for commitwise-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b44eb9d4e3398f61a17f931098e885524a59ed25a1ccd34155846e150b67d72d
MD5 22eb54afc3bb65f478036970a5238b6e
BLAKE2b-256 97a5bed93ef5e5dd2da4fab0d0921222bf3f9190f9e1383cbb12c767069e8637

See more details on using hashes here.

Provenance

The following attestation bundles were made for commitwise-0.1.6-py3-none-any.whl:

Publisher: release.yml on hasssan-hasssan/commitwise

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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