Skip to main content

Review your code changes in a git repository using an LLM

Project description

gait

PyPI version

gait is a command line tool that helps you review code changes in a git repository using an LLM. gait commands generates diffs based on git commands, and (currently) uses OpenAI's chat completion models to provide code review suggestions.

Getting Started

Installation

You can install gait using pip:

pip install gait

Currently, gait only supports OpenAI chat completion models. To use any of the commands, you can either set the OPENAI_API_KEY environment variable

export OPENAI_API_KEY='YOUR API KEY HERE'

or pass your OpenAI API key manually with --openai-api-key option.

Commands

  • Add: Review changes between the working tree and the index.

    gait add
    
  • Commit: Review changes between the index and the HEAD.

    gait commit
    
  • Merge: Review the result of merging a feature branch into the HEAD.

    gait merge <feature_branch>
    
  • Push: Review the changes between the HEAD and the remote.

    gait push [remote]
    
  • Pull Request (PR): Review the result of a pull request from HEAD to the target branch in the remote.

    gait pr <target_branch> [remote]
    

Options

  • --openai_api_key: Specify the OpenAI API key. Can also be set via OPENAI_API_KEY environment variable.
  • --model: Choose the OpenAI GPT model for reviews (default: gpt-4-turbo-preview).
  • --temperature: Set the temperature for model responses (range: 0-2) (default: 1).
  • --system_prompt: Use a custom system prompt for diff patches.
  • --unified: Context line length on each side of the diff hunk (default: 3).

Help

To get help, run gait --help.

To get help on a specific command, run gait <command> --help.

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

gait-0.1.1.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

gait-0.1.1-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file gait-0.1.1.tar.gz.

File metadata

  • Download URL: gait-0.1.1.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.8.18 Darwin/23.3.0

File hashes

Hashes for gait-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f840ba8fabf3105f54eb396e8f21e3943c61c127a7aa91c6725da9b906cc9d6c
MD5 6049db9c77fdf583e5b69c7e0f4aac66
BLAKE2b-256 601104c4a96ce2ef004e60bf3fc08ba9d9532f01013623a4a32e0eec322bfc5e

See more details on using hashes here.

File details

Details for the file gait-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: gait-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.8.18 Darwin/23.3.0

File hashes

Hashes for gait-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0a9d0b533023db0faff238161bcaaca2fbf174f797d2399978c9a0f4f962b8b3
MD5 c9516c036f645cc338898ac6a676768c
BLAKE2b-256 e2041720b0a497529cdac61c8c5e884eaef8717222210a77c6baab2a518539cf

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