Skip to main content

AI-powered Git helper

Project description

GitAssist

GitAssist is a command-line tool that uses OpenAI to generate commit messages and pull request descriptions based on your Git history and staged changes. It streamlines your Git workflow by suggesting clear, concise, and contextually appropriate messages.

Features

  • Automatically generate commit messages from staged changes
  • Automatically generate PR titles and descriptions from commit history
  • Push the current branch and open the PR creation page on GitHub or GitLab

Installation

Using pipx (Recommended)

pipx allows you to install and run Python applications in isolated environments, ensuring that your system Python packages remain untouched.

  • On macOS (using Homebrew):

    brew install pipx
    pipx ensurepath
    

    After running pipx ensurepath, restart your terminal to apply the changes.

  • On Linux (Debian/Ubuntu):

    sudo apt update
    sudo apt install pipx
    pipx ensurepath
    

    After running pipx ensurepath, restart your terminal to apply the changes.

  • On Windows:

    python -m pip install --user pipx
    python -m pipx ensurepath
    

    After running pipx ensurepath, restart your terminal to apply the changes.

For more detailed instructions, refer to the official pipx installation guide: pipx.pypa.io

  • Install Command
    pipx install gitassist
    

Usage

Initialize the tool with your OpenAI API key

gitassist init

init example

Generate and commit with an AI-suggested message

gitassist commit

Opens your default system editor with a pre-filled commit message. Edit as needed, save, and close the editor to proceed with the commit.

commit example

Generate a PR title and description, push your branch, and open the PR page

gitassist new-pr --base main

Pushes your local branch and opens the GitHub or GitLab new pull request page with a generated title and description. You can review, edit, and publish your PR!

new pr example

Requirements

  • Python 3.7+
  • git must be installed and available on your system path
  • A valid OpenAI API key

Assumptions

GitAssist assumes a few things about your development workflow:

  1. Branching Model: You are working on a feature branch that diverged from a long-lived base branch like main.
  2. Staging Area: When running gitassist commit, you have already staged your changes.
  3. Remote Setup: You have a remote named origin pointing to a GitHub or GitLab repository.
  4. Authentication: You are authenticated with the remote (e.g., via SSH or HTTPS credentials) and have permission to push.
  5. Push Before PR: Your local branch does not need to be pushed manually before PR creation — GitAssist pushes it for you.
  6. Platform Detection: GitAssist can detect whether you're using GitHub or GitLab based on your origin URL.

License

MIT License

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

gitassist-0.4.4.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

gitassist-0.4.4-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file gitassist-0.4.4.tar.gz.

File metadata

  • Download URL: gitassist-0.4.4.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for gitassist-0.4.4.tar.gz
Algorithm Hash digest
SHA256 24f8eeb58732246d41c8a0212f56aec999e76a9cfef16869c4ce68be14d9cd70
MD5 65a559404cd62a143da2740a1229fc8d
BLAKE2b-256 867fee6b06a420fd889d92ec85e69a31a94d13896e112ada19780f658ddc07bf

See more details on using hashes here.

File details

Details for the file gitassist-0.4.4-py3-none-any.whl.

File metadata

  • Download URL: gitassist-0.4.4-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for gitassist-0.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c1057c849d9e41b261670f3d52c527ae6293ff178919dc8124c2b05246e0a42f
MD5 44ab43790fd8d1f937febc93765e69a9
BLAKE2b-256 8f3cb3c866f33e99ecd7c76bb378c6df36af39908471004d4a38fcdd71e503e9

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