Skip to content

jinyang628/commit-pal

Repository files navigation

commit-pal ⚡️

A CLI AI assistant that helps you write commit messages at the speed of light using locally run LLMs.

Quick Start

Install and setup commit-pal

Install the latest version of commit-pal from PyPI:

pip install commit-pal
cm --setup # Configure the style of the commit messages

Run LLM locally with Ollama

  • Ollama should be installed and running
  • Pull and run a model to use with the library: ollama run <model> e.g. ollama run qwen2.5-coder:7b
    • See Ollama.com for more information on the models available.
    • We have seen the best performance with qwen2.5-coder:7b model so far.

By default, Ollama will run on localhost:11434.

Generate commit message

After staging your changes, run the following command to generate a commit message:

cm

The proposed commit message will be displayed in the terminal for you to review and confirm

Development Setup (Only for developers who wish to contribute to the project)

Install Poetry

Please follow the official installation guide to install Poetry, which will be used to manage dependencies and environments.

# Install dependencies
poetry install
# Activate Python Virtual Environment for Mac/Linux
eval "$(poetry env activate)"

# Activate Python Virtual Environment for Windows
.venv\Scripts\Activate.ps1

Style Enforcement

make lint

Quick Start to Test CLI App

pip uninstall cm -y # Uninstall old version of commit-pal
pip install -e . -v # Install new version of commit-pal
cm # Run commit-pal

Publish to PyPI

# Bump the semantic version in pyproject.toml before running this command
make publish

About

⚡️An AI assistant that writes commit messages at the speed of light

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •