Skip to main content

An AI-powered CLI tool to help you write better commit messages and PRs.

Project description

G3

All-in-one CLI to commit your work to Github [Presentation, Design]

Watch the video

Install

pip install g3

Alias

You can, optionally, create the alias g=g3 so that you execute simply g commit and g pr.

Configuration

g3 configure

You will be asked to enter:

  • your Github token
  • your open-ai key
  • the openai model you want to use
  • the temperature which will be used to generate the commit messages and PR descriptions
  • the openai api version
  • the tone which will be used in the commit messages and PR descriptions
  • the commit message max characters
  • the PR description max words

Usage

Commit

g3 commit

Options:

  • --tone: The tone to use
  • --jira: The jira ticket(s) to reference
  • --include: A phrase you want to include
  • --edit: The hash of the commit you want to rephrase

PR

g3 pr

Options:

  • --tone: The tone to use
  • --jira: The jira ticket(s) to reference
  • --include: A phrase you want to include
  • --edit: The number of the PR you want to rephrase

Development

The project requires Python 3.11 and Poetry for dependency management.

Optionally configure poetry to create the virtual environment within the project as follows:

poetry config virtualenvs.in-project true

Build

Now install the project, along with its development dependencies, in a local virtual environment as follows:

poetry install

You may enable the virtual environment, so that you run modules without the poetry run prefix, as follows:

source `poetry env info -p`/bin/activate

or simply as follows:

poetry shell

Contribution

You are expected to enable pre-commit hooks so that you get your code auto-sanitized before being committed.

  • mypy: Static type checker of variables and functions based on PEP 484
  • isort: Optimizes imports
  • black: Opinionated code formatter based on PEP 8
  • flake8: Improves code style and quality based on PEP 8

Install pre-commit before starting to contribute to the project as follows:

pre-commit install

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

g3-0.5.0.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

g3-0.5.0-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

Details for the file g3-0.5.0.tar.gz.

File metadata

  • Download URL: g3-0.5.0.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.4 Linux/5.15.0-1041-azure

File hashes

Hashes for g3-0.5.0.tar.gz
Algorithm Hash digest
SHA256 b846c42cffb57c24ca87b6c919b56acd9b193d25739342b057f7a77f899ff441
MD5 070aad672a10e1293ceaf2b3d165d31a
BLAKE2b-256 3693b51817becd8ba8e84e843b8a97e6a1bab7180012ae93b3c8ffb80085ed0d

See more details on using hashes here.

File details

Details for the file g3-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: g3-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 23.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.4 Linux/5.15.0-1041-azure

File hashes

Hashes for g3-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d545a45dd0e3690be3359c1ef73ed019928e990c3df0d8a2f5bdade72134a98f
MD5 3cb5f606f6e9611a84b5cf80a110662a
BLAKE2b-256 a3a89a4ac045cfe35b1b5a4cc9d28b79f57a03e1e1f39ec1d9953fc7fbca6312

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page