Commify

Commify is a command-line interface (CLI) tool that generates meaningful, structured commit messages for Git repositories using AI. By analyzing the staged changes (diff) in your repository, it creates commit messages that follow conventional commit guidelines, optionally including emojis for better context and readability. Don't forget to ⭐ the project!

[!Caution] Ollama provider can be slow without a good GPU or a very large AI model. It's not a Commify optimization problem.

[!NOTE] Latest version: PyPI version
Stats: Downloads Downloads


📚 Table of Contents


✨ Features


🛠️ Installation

Windows

Make sure you have installed Git, python3.10+ and ollama (ollama is optional) Run the following:

pip install Commify

Linux

Make sure you have installed Git, python3.10+, pipx and ollama (ollama is optional) If you don't, use this command:

sudo apt install git
sudo apt install pipx

And install Commify:

pipx install Commify
pipx ensurepath

After that, restart your terminal and you will already have Commify installed.


🏗️ Usage

See the Commify Documentation to see more example usage, milestones, and others.

Run the commify CLI with the desired options:

commify <path_to_repo> [--lang <language>] [--emoji <True/False>] [--model <AI_model>] [--provider <AI_PROVIDER>] [--apikey <API_KEY>]

Examples

Basic Usage

Commify supports multiple AI providers, from locally run (Ollama) to cloud-based (Groq, Gemini, Pollinations.ai, Openai, and others). You can use it to generate commit messages in various languages and styles.

[!NOTE] See more example usage in documentation docs/example-usage

Using Ollama Provider:

commify /path/to/repo --lang english --emoji True --model llama3.1 --provider ollama

Using G4F Provider:

commify /path/to/repo --lang english --emoji True --model gpt-4o --provider g4f

Using Openai Provider:

commify /path/to/repo --lang english --emoji True --model gpt-4o --provider openai

Using Groq Provider:

commify /path/to/repo --lang english --emoji True --model llama-3.3-70b-versatile --provider groq

Using Pollinations.ai Provider:

commify /path/to/repo --lang english --emoji True --model openai-large --provider pollinations

Using Gemini Provider:

commify /path/to/repo --lang english --emoji True --model gemini-2.0-flash --provider gemini

[!Caution] All pollinations models can be found in API model endpoint Warning: Pollinations.ai changed their API use, so you are allowed to use only the 'anonymous' tier models. See Provider Issues Commify documentation to see more about.

Without Specifying The Repository Path:

cd /path/to/repo
commify --lang english --emoji True --model llama3.1 --provider ollama

Arguments


💡 Features in Detail

Commit Message Review

Once a message is generated, you'll be prompted to:

Commify Providers

Commify currently supports only5 providers:

Feel free to submit a pull request or open an issue to add more providers!

Apikey Saving

Commify allows you to save and modify API keys for certain providers (openai, groq and gemini). This can be useful if you frequently use these providers and want to avoid entering the API key each time you run Commify.

Saving an API Key

To save an API key for a provider, use the --save-apikey option followed by the provider name and the API key. For example:

commify --save-apikey openai sk-...

This will save the API key for the openai provider. You can also save an API key for the groq provider:

commify --save-apikey groq gsk-...

And if you want to save an API key for the gemini provider, you can do it like this:

commify --save-apikey gemini Alza...

The saved API key will be stored in a file located at ~/.commify_env and will be automatically used in future Commify runs.

Modifying an API Key

If you need to update an existing API key, use the --mod-apikey option followed by the provider name and the new API key. For example:

commify --mod-apikey openai sk-...

This will update the saved API key for the openai provider. Similarly, you can update the API key for the groq provider:

commify --mod-apikey groq gsk-...

Also, you can save or modify the API key for the gemini provider in the same way:

commify --save-apikey gemini Alza...

Using a Temporary API Key

If you prefer not to save the API key, you can provide it directly when running Commify using the --apikey option. For example:

commify /path/to/repo --provider openai --apikey sk-...

This will use the provided API key for the current run without saving it.

Feel free to submit a pull request or open an issue if you have any suggestions or improvements for this feature!


🧩 Testing Information

Confirmed successful runs (with no errors) on the following:

Let us know if it runs on your machine too!


💻 Developer Information

Commify is developed and maintained by Matuco19.


📑 License

License-MATCO Open Source V1

This project is open-source and available under the MATCO-Open-Source License. See the LICENSE file for details.


👋 Contributions

Contributions are welcome! Feel free to open an issue or submit a pull request on GitHub.


Start making commits with Commify today! 🎉