Skip to content

leochiu-a/git-pr-ai

Repository files navigation

Git PR AI

npm version npm downloads

A CLI tool that empowers developers to create GitHub Pull Requests faster and more efficiently with the help of AI.


Read the Docs

git-pr-ai is a command-line tool designed to streamline the process of creating GitHub Pull Requests from JIRA tickets. By leveraging the power of AI, it can automatically generate branch names, PR descriptions, and even assist with code reviews, allowing you to focus on what truly matters: writing high-quality code.

Key Features

  • AI-Powered Intelligence: Harness Claude Code, Gemini AI, Cursor Agent, or Codex to transform mundane git tasks into intelligent, context-aware workflows that understand your code and intentions.
  • Smart JIRA Integration: Seamlessly bridge your project management and development workflow with automated branch creation and context extraction from tickets.
  • Agent-Agnostic Simplicity: No need to rely on MCP or write custom prompts. Use the same intuitive commands to switch seamlessly between different AI Agents.
  • Zero-Friction Setup: From installation to first PR in under 5 minutes - because your time is better spent coding, not configuring tools.

Prerequisites

Before you begin, please ensure you have completed the following setup:

Platform & AI Provider Support

Platform Claude Code Gemini CLI Cursor CLI Codex CLI
GitHub
GitLab

All combinations of platforms and AI providers are fully supported!

Installation

pnpm add -g git-pr-ai

Quick Start

After installing git-pr-ai, the CLI registers a suite of git subcommands (e.g., git pr-ai, git create-branch, git pr-review) so you can run everything directly from your terminal.

  1. Configure the tool (required for git-pr-ai to fetch JIRA data):

    # Set up your preferred AI provider (see AI Providers guide for options)
    git pr-ai config
  2. Create a branch from a JIRA Ticket:

    # Automatically generates semantic branch names from JIRA tickets
    git create-branch --jira PROJ-123

    No more inconsistent branch names or forgetting ticket details. Just paste your JIRA ID and get perfectly formatted branches every time.

  3. Create AI-powered Commits:

    # AI-generated commit messages based on your changes
    git ai-commit

    No more generic commit messages. AI analyzes your changes and suggests 3 meaningful commit messages following conventional commit format. Pick the one that fits best!

    # Provide extra context for the commit message
    git ai-commit "explain why the change was needed"
    # Include a JIRA ticket in the commit message
    git ai-commit --jira SL-1234
  4. Create a Pull Request:

    # One-command PR creation with intelligent title formatting
    git open-pr

    Transform your workflow from "commit → switch to browser → fill forms → copy URLs" to just "commit → one command → done!"

  5. Update PR Description with AI:

    # AI-powered PR descriptions that explain what changed and why
    git update-pr-desc

    Never write another boring "fix bug" description. Get detailed, context-aware PR descriptions that help reviewers understand your changes instantly.

  6. Review PR with AI:

    # Instant AI code review with improvement suggestions
    git pr-review

    Think of it as having a senior developer review your code 24/7. Catch bugs early, improve code quality, and learn best practices automatically.

  7. Generate Weekly Summary:

    # AI-generated weekly summaries for standups and reviews
    git weekly-summary

    Stop scrambling to remember what you worked on this week. Get AI-generated summaries that highlight your impact and achievements automatically.

Documentation

Want to learn more about detailed configurations and features?

Please refer to our full documentation.

About

A CLI tool that empowers developers to create GitHub Pull Requests faster and more efficiently with the help of AI.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •