Generate the title and body of the Pull Request with ChatGPT API based on git diff. Create a new Pull Request or update an existing Pull Request based on this title and body.
PRAI (Pull Request AI) is a GitHub CLI extension that automates the creation of pull request titles and descriptions by leveraging the power of OpenAI's ChatGPT API. Whether you're a solo developer or part of a team, PRAI helps you save time by generating thoughtful, concise, and well-structured PR summaries based on your git diffs.
https://github.com/user-attachments/assets/b09d5c22-6711-4bbc-b652-3675b922c0fe
https://github.com/user-attachments/assets/011514dc-348e-417d-b753-ee3e7144c87f
Install the extension using GitHub CLI:
gh extension install tomoyaf/gh-prai
Before you can start using PRAI, configure your OpenAI API key:
gh prai config api_key YOUR_OPENAI_API_KEY
To automatically generate the title and body of your pull request, simply run:
gh prai # or 'gh prai create'
Language: Set the language for the PR title and description (default: English).
gh prai config language en # or 'ja'
Template: Customize the template used for PR descriptions.
gh prai config template default # or './.github/PULL_REQUEST_TEMPLATE/mytemplate.md'
Custom Prompts: Tailor the AI's behavior by providing a custom prompt.
gh prai config prompt "Your custom prompt"
For more details on available commands and options:
gh prai --help
We welcome contributions! Please feel free to submit issues or pull requests to help improve PRAI.
This project is licensed under the MIT License.