A Python package for comet-related functionalities
Project description
Comet-Labs: AI-Powered Commit Messages
✨ Comet-Labs is a powerful and user-friendly CLI tool designed to generate smarter, AI-driven commit messages and streamline your development workflow. With optional Jira integration and lightweight NLP-based summarization, it’s a must-have for developers looking to save time and improve code clarity. 🚀
Features
- AI-Driven Commit Messages: Generate commit messages with detailed descriptions using OpenAI or a free AI fallback.
- Jira Integration: Link commit messages to Jira tickets effortlessly.
- Lightweight NLP Fallback: For users without OpenAI access, enjoy basic summarization powered by lightweight NLP tools.
- Intuitive CLI: Easy-to-use commands for generating, customizing, and committing changes.
- Open Source: Built for the community, by the community.
Installation
Prerequisites
- Python >= 3.8
- Pip
Install from PyPI
pip install comet-labs
Quick Start
1. Initialize Comet-Labs
Set up your environment with a simple interactive initialization process:
comet-labs initialize
During initialization:
- You'll be prompted to enter your OpenAI API key (recommended for advanced features).
- Optionally, configure Jira integration to link commit messages with Jira tickets.
- Ensure necessary NLP resources (like TextBlob) are downloaded automatically.
2. Generate Commit Messages
Stage your changes and run:
comet-labs run
Comet-Labs will:
- Analyze the changes in your git repository.
- Generate a concise commit message and detailed description.
3. Dedicate Credits (Optional)
To view project credits and a special dedication:
comet-labs credits
Commands
| Command | Description |
|---|---|
comet-labs initialize |
Interactive setup for OpenAI API, Jira integration, and NLP resources. |
comet-labs run |
Analyze git changes and generate commit messages. |
comet-labs credits |
View project credits. |
Example Workflow
Generating a Commit Message
-
Stage your changes:
git add .
-
Run Comet-Labs:
comet-labs run -
Example Output:
AI-Generated Commit Information: Message: "Update example script" Brief Description: - Modified imports. - Updated print statement. Detailed Description: - Changed the imports in example.py to include 'sys' and 'requests'. - Replaced the print statement to output 'Hello, GPT-3' instead of 'Hello World'. File Changes: - example.py: Modified imports and print statement.
-
Proceed with push (the commit has already been created at this point):
git push
Configuration Options
Environment Variables
Comet-Labs uses the following environment variables:
| Variable | Description |
|---|---|
OPENAI_API_KEY |
Your OpenAI API key for GPT features. |
JIRA_BASE_URL |
Jira base URL (e.g., https://example.atlassian.net). |
JIRA_USERNAME |
Jira username or email. |
JIRA_API_TOKEN |
API token for Jira authentication. |
You can manage these variables in a .env file.
Lightweight AI Fallback
For users without an OpenAI API key, Comet-Labs leverages TextBlob for basic NLP-based summarization. While results are not as detailed as OpenAI's GPT models, they provide a useful alternative for generating commit messages.
Contributing
We welcome contributions to improve Comet-Labs! ❤️
Getting Started
- Fork the repository on GitHub.
- Clone your fork locally:
git clone https://github.com/Sahilsingh0808/comet.git
- Install dependencies:
pip install -r requirements.txt
- Run tests:
pytest
Want to Help?
- Report bugs or suggest features via GitHub Issues.
- Submit a pull request with your improvements.
FAQ
Q: What if I don’t have an OpenAI API key?
A: No problem! Comet-Labs will use a free AI fallback powered by TextBlob for lightweight commit message generation.
Q: Can I skip Jira integration during initialization?
A: Yes! Jira integration is optional and can be configured later by re-running comet-labs initialize.
Q: Does Comet-Labs store my API keys or credentials?
A: No, we respect your privacy. All keys are securely stored locally in a .env file.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Links
- GitHub Repository: Comet-Labs on GitHub
- PyPI Package: Comet-Labs on PyPI
- Issues & Feedback: Report an Issue
Let me know if you'd like to customize this further! 🚀
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 comet_labs-0.1.6.tar.gz.
File metadata
- Download URL: comet_labs-0.1.6.tar.gz
- Upload date:
- Size: 14.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd4a41a68181f08eaba9c07a4326e9a0fb00f61a503a7f6736ef0806c7709ad9
|
|
| MD5 |
56516c7c2298baaa815db42fd2544d03
|
|
| BLAKE2b-256 |
249c517214176a7979e281decad305731b2437ab52c2ff5ee61e0f3deab2c2d1
|
File details
Details for the file comet_labs-0.1.6-py3-none-any.whl.
File metadata
- Download URL: comet_labs-0.1.6-py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83b326fe35f5b06acac9acede344d9b0ae7abc0ef4f1ed1866c917fd5ca55bd7
|
|
| MD5 |
ac4ecd525ce5ece5105fe55b49f64e51
|
|
| BLAKE2b-256 |
e14618252c44fdcf51df38b2a9ed58b27dca5e382a8b7185c9b948bd25e2bcb6
|