What is git-pr-ai?
Git PR AI Tool is a powerful command-line tool that automates Pull Request creation for GitHub and GitLab with JIRA integration. It streamlines your development workflow by automatically extracting JIRA ticket numbers from branch names and creating well-structured PRs with AI assistance.
Key Features
- 🚀 Multi-Platform Support: Works with both GitHub and GitLab repositories
- 🔍 JIRA Integration: Can integrate with JIRA to fetch ticket information
- 🤖 AI-Powered Intelligence: Leverages Claude Code, Gemini, Cursor Agent, and Codex for smart content generation and code analysis
- 🎯 Context-Aware Analysis: Understands your repository without manual input
Quick Start
Install the tool globally:
pnpm add -g git-pr-aiConfigure AI provider (and optional JIRA integration):
# Set up AI provider (defaults to Claude Code, or choose Gemini, Cursor Agent, or Codex) and optionally JIRA authentication
git pr-ai configNeed help deciding which provider to use? Check the AI Providers guide.
Available Commands
Each command below can be used independently based on your needs:
Plan issue implementation:
# Generate implementation plan for JIRA ticket
git plan-issue --jira PROJ-123Take issue and implement plan:
# Execute implementation plan
git take-issue --plan-file plan.mdCreate a branch from JIRA ticket:
# Generates branch name following commitlint conventions
git create-branch --jira PROJ-123Create a Pull Request:
# Automatically fetches JIRA ID and title for PR creation
git open-prUpdate existing PR description with AI:
# Enhances your PR description using AI analysis
git update-pr-descGet AI-powered PR review:
# Provides intelligent code review feedback
git pr-reviewYou can use any of these commands whenever you need them - they're designed to work independently and enhance your existing Git workflow.
How It Works
The Git PR AI Tool integrates seamlessly with your existing Git workflow:
- Create Branch:
git create-branch --jira PROJ-123fetches JIRA ticket details and generates an appropriate branch name - Make Changes: Work on your feature/fix as usual with your standard Git workflow
- Open PR:
git open-prautomatically creates a pull request with JIRA ticket information and smart titles - Enhance with AI:
git update-pr-descuses AI to analyze your changes and generate comprehensive descriptions - Review & Merge:
git pr-reviewprovides AI-powered code review feedback before merging
Next Steps
- Installation Guide - Detailed installation and setup instructions
- Commands Reference - Complete list of available commands
- Configuration - Customize the tool for your needs