A CLI tool to generate commit messages from your code changes
Project description
ICOMMIT
Icommit is a simple command-line tool to generate commit messages for Git repositories. It analyzes the staged changes in your files and generates meaningful commit messages using Groq’s AI-powered Llama models.
Features
- Generates commit messages for staged Git changes
- Uses Groq’s AI model to analyze code diffs
- Easy setup and integration with Git workflow
- Simple CLI commands for quick use
- Secure, non-environment-based API key handling
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:
- Visit Groq Console and create an account.
- Generate a new API key and copy it.
- Run the following command to store your API key:
icommit-key <api-key>
This will save the API key to a configuration file on your local system, ensuring it is kept secure and used only for your Icommit requests.
Usage
Generating a Commit Message
Once you’ve set up the API key, you can generate commit messages based on your staged changes in any Git repository.
- Stage your changes:
git add .
- 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
icommitcommand.
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-keycommand before generating commit messages. - Ensure that you have staged changes using
git addbefore running theicommitcommand. - 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>.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file icommit-0.1.0.tar.gz.
File metadata
- Download URL: icommit-0.1.0.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75562114bb0efe2d2d0f94a2dd586518b55781f58a1f5e5b20585d540edec869
|
|
| MD5 |
2dcf150822f91c10659a5d172d7993a0
|
|
| BLAKE2b-256 |
c924a220705386fc774207d688db07e912c22f1a43e15627b9f490013cc52ea7
|
File details
Details for the file icommit-0.1.0-py3-none-any.whl.
File metadata
- Download URL: icommit-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
190771e3ebf9ac2432e691197b71662b5ab890b1b5decf949882e43ee910a28a
|
|
| MD5 |
33c216e27912b63457de0f2484a573cf
|
|
| BLAKE2b-256 |
0994eab584974f829263a211e855dcf4c63aed284329e204b11555e222976056
|