Skip to main content

AI-powered semantic git commit message generator using Groq's LLaMA models

Project description

gitsc (Git Semantic Commit)

A command-line tool that generates semantic commit messages using AI, following the Conventional Commits format.

Features

  • Generates 3 different semantic commit message suggestions
  • Interactive UI with keyboard navigation (up/down arrows)
  • Uses Groq's LLaMA and Gemma models
  • Multiple model options for different needs (speed vs. quality)
  • Follows Conventional Commits format
  • Interactive mode with streamlined commit process
  • Easy to use command-line interface
  • Secure API key storage using system keyring
  • Command-line flags for quick configuration
  • Support for undoing last commit

Installation

You can install gitsc directly from PyPI:

pip install gitsc

Or install from source:

git clone https://github.com/prxdyut/gitsc.git
cd gitsc
pip install -e .

GROQ API Key Setup

You'll need a GROQ API key to use this tool. Here's how to get one:

  1. Sign up at Groq Console
  2. Navigate to the API Keys section
  3. Create a new API key

You can set up your API key in several ways:

  1. Let the tool prompt you on first use
  2. Use the command-line flag: gitsc --api-key "your-api-key" or -k
  3. Use the interactive menu to update the key at any time

Your API key will be securely stored in your system's keyring.

Available Models

The tool supports multiple Groq models that you can choose from based on your needs:

  • llama3-70b (default): LLaMA 3.3 70B Versatile - Most capable, best quality
  • llama3-8b: LLaMA 3.1 8B Instant - Faster response time
  • gemma-9b: Gemma 2 9B - Alternative model

Select a model using the --model or -m flag:

gitsc -m llama3-8b "your commit message"

Usage

Basic usage:

gitsc "Your commit description here"

With model selection:

gitsc -m llama3-8b "add new user authentication feature"

Update API key:

gitsc -k "your-new-api-key"

Undo last commit:

gitsc back

Running without arguments will show the help message and setup instructions:

gitsc

Interactive Interface

The tool provides an interactive interface with the following controls:

  • ↑/↓ - Navigate between suggestions
  • Enter - Select and use the highlighted commit message
  • Space - Toggle additional options menu
  • c - Add more context to get better suggestions
  • r - Generate new suggestions with a different description
  • b - Undo last commit (soft reset)
  • k - Reset/update API key
  • q - Quit without committing

Interactive Context Refinement

If none of the initial suggestions match what you're looking for, you can use the c option to provide additional context. This allows you to:

  1. Add more details about the changes
  2. Explain the purpose or impact
  3. Provide technical context
  4. Clarify the scope

The tool will then generate new suggestions taking this additional context into account. You can add context multiple times to refine the suggestions further.

Commit Message Format

The tool generates commit messages following the Conventional Commits format:

type(scope): summary

Common types include:

  • feat: New features
  • fix: Bug fixes
  • chore: Maintenance tasks
  • docs: Documentation changes
  • refactor: Code restructuring
  • test: Adding or modifying tests
  • style: Code style changes
  • perf: Performance improvements
  • ci: CI/CD changes

Requirements

  • Python 3.6+
  • Groq API key
  • Git installed and configured

License

MIT License - See 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

gitsc-1.1.0.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

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

gitsc-1.1.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file gitsc-1.1.0.tar.gz.

File metadata

  • Download URL: gitsc-1.1.0.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for gitsc-1.1.0.tar.gz
Algorithm Hash digest
SHA256 33316f0b49fe732fdb0d3c5e3472d25963d61bd68a7a2f4f30b1e5d4ce9741bd
MD5 0865017cd9784ca84e160adde77f2c60
BLAKE2b-256 2032b9a35d50897cebaf3fb39f69222db7dc30b3fec280cbdd2283aee54f34cf

See more details on using hashes here.

File details

Details for the file gitsc-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: gitsc-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for gitsc-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 42b8efe9893c1a8ead455065084ff9a761a29291c0b18228ca7a68194e255d31
MD5 952cbfea2a51858283f91b337ecbbb6f
BLAKE2b-256 4b5daa4de4cc384e8c60925e13345fb5da1bf4c913d8445b17a95ba8dd941c2d

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