Skip to main content

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

  1. Stage your changes:

    git add .
    
  2. Run Comet-Labs:

    comet-labs run
    
  3. 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.
    
  4. 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

  1. Fork the repository on GitHub.
  2. Clone your fork locally:
    git clone https://github.com/Sahilsingh0808/comet.git
    
  3. Install dependencies:
    pip install -r requirements.txt
    
  4. 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


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

comet_labs-0.1.5.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

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

comet_labs-0.1.5-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

Details for the file comet_labs-0.1.5.tar.gz.

File metadata

  • Download URL: comet_labs-0.1.5.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.20

File hashes

Hashes for comet_labs-0.1.5.tar.gz
Algorithm Hash digest
SHA256 f92b093d0158e4194f80d774a39721a566d0ae1455a92a355a0ba5f5597be043
MD5 bdd1e35c2283edc5c20b0318c56f2ec5
BLAKE2b-256 2de040dba44535c214358cc9b452e694d60431e916500bd3eb04cc3ea5ac1da0

See more details on using hashes here.

File details

Details for the file comet_labs-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: comet_labs-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 15.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.20

File hashes

Hashes for comet_labs-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4149a13bf3fae2f5277cf17854a10d60b0126406eae15a5294e322ff9f275437
MD5 24374c9d6349695eccea437c4e1de4ef
BLAKE2b-256 fb272a8161adb9637a58cfbb2926e5c997509152127d12dcf4bb28407244d634

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