Skip to main content

A CLI tool to generate commit messages from your code changes

Project description

Icommit

ICOMMIT - AI-Driven Git Commit Messages

Icommit is a simple command-line tool that generates meaningful commit messages for your Git repositories. By analyzing staged changes, it leverages Groq’s AI-powered Llama models to produce high-quality messages.

Icommit Badge PyPI - Downloads

Table of Contents

Features

  • Generates AI-driven commit messages from staged Git changes
  • Uses Groq’s AI model to analyze code diffs
  • Easy Git integration with minimal setup
  • Secure API key handling (no environment variables)
  • Simple CLI commands for quick use

Installation

To start using ICOMMIT, follow these steps:

1. Install Icommit

You can install ICOMMIT via pip:

pip install icommit

2. Set up the API Key

To use the AI-powered commit message generation, you need to configure your API key:

  1. Visit Groq Console and create an account.
  2. Generate a new API key and copy it.
  3. Run the following command to store your API key:
icommit-key <api-key>

This securely saves your API key in a local configuration file.

Usage

Generating Commit Messages

Once you’ve set up the API key, you can generate commit messages based on your staged changes in any Git repository.

  1. Stage your changes:
git add .
  1. Generate a commit message:
icommit

This command will analyze the staged files and suggest a concise, AI-generated commit message for you.

CLI Commands

icommit

This command generates a commit message based on the changes in the current directory (specifically staged Git files).

icommit
  • The AI model analyzes the diffs and generates a summary of the changes.
  • It automatically uses the Groq AI model for analysis.

icommit-key

This command allows you to set your API key, which is needed for the AI-powered functionality.

icommit-key <your-api-key>
  • The API key is stored locally, ensuring security without relying on environment variables.
  • This command is essential before you can run the icommit command.

Configuration

ICOMMIT stores your API key in a local configuration file for security. You can view or modify the configuration file directly if needed (location depends on your OS, e.g., ~/.icommit_config or similar).

Example Usage

Stage Your Files:

git add src/example_file.py

Generate a Commit Message:

icommit

Output:

feat(api): add user authentication endpoint

- Added POST route for user login
- Implemented JWT token generation for secure sessions
- Updated user model to include password hashing

The API now supports secure user login with JWT authentication.

Troubleshooting

  • If the API key is missing or invalid, you’ll be prompted to set it using the icommit-key command before generating commit messages.
  • Ensure that you have staged changes using git add before running the icommit command.
  • If the tool doesn’t seem to work as expected, check the configuration file for your API key, or reset it by running icommit-key <new-api-key>.

Release Notes

For details on the latest releases, see the Releases Notes here.

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

icommit-0.3.0.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

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

icommit-0.3.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file icommit-0.3.0.tar.gz.

File metadata

  • Download URL: icommit-0.3.0.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for icommit-0.3.0.tar.gz
Algorithm Hash digest
SHA256 aaca84caa49baebd7880d2518c881493a95f2a617fe4ef8b6dee7b14d9c2fa49
MD5 e79505a9bb74c2604e3ff7be7613cb7b
BLAKE2b-256 1d0aa7e83ffac4e262dcb9c0a49a5a4fed2f15e014c61e6d6d049614d7f6cac0

See more details on using hashes here.

File details

Details for the file icommit-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: icommit-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for icommit-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cbdeed2b2c6e17ea5bb7461bf29b83bfcb1e1b9b793ecbe886146afcfcc4a263
MD5 fafe67534dc261d09c59600bdb3f15e6
BLAKE2b-256 5a5289b8ddf000134216b118d1c6003a360772ab2cb4b79b8dc648c5a08da6af

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