Metadata-Version: 2.1
Name: gait
Version: 0.1.0
Summary: Review your code changes in a git repository using an LLM
Home-page: https://github.com/can-taslicukur/gait
License: Apache-2.0
Author: Can Taşlıçukur
Author-email: can.taslicukur@ozu.edu.tr
Requires-Python: >=3.8,<4.0
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: gitpython (>=3.1.42,<4.0.0)
Requires-Dist: openai (>=1.12.0,<2.0.0)
Requires-Dist: typer[all] (>=0.9.0,<0.10.0)
Project-URL: Repository, https://github.com/can-taslicukur/gait
Description-Content-Type: text/markdown

# `gait`

`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

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

```bash
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.
  
  ```bash
  gait add
  ```

- **Commit**: Review changes between the index and the HEAD.
  
  ```bash
  gait commit
  ```

- **Merge**: Review the result of merging a feature branch into the HEAD.
  
  ```bash
  gait merge <feature_branch>
  ```

- **Push**: Review the changes between the HEAD and the remote.
  
  ```bash
  gait push [remote]
  ```

- **Pull Request (PR)**: Review the result of a pull request from HEAD to the target branch in the remote.
  
  ```bash
  gait pr <target_branch> [remote]
  ```

### Options

- `--openai_api_key`: Specify the OpenAI API key. Can also be set via 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).
- `--system_prompt`: Use a custom system prompt for diff patches.
- `--unified`: Context line length on each side of the diff hunk.

## Help

To get help, run `gait --help`.

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

