Skip to content

wannabehero/gh-aipr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gh-aipr

GitHub CLI extension to generate pull request titles and descriptions based on your current branch commits and the diff.

Installation

GitHub CLI Extension

Make sure the CLI is installed: https://cli.github.com/

gh extension install wannabehero/gh-aipr

Nix (Home Manager)

If using flakes, enable the overlay so pkgs.gh-aipr is available:

# flake inputs
inputs.gh-aipr.url = "github:wannabehero/gh-aipr";

# when constructing pkgs
pkgs = import nixpkgs {
  inherit system;
  overlays = [ gh-aipr.overlays.pkgs ];
};

Then in your Home Manager configuration:

programs.gh = {
  enable = true;
  extensions = [ pkgs.gh-aipr ];
};

Configuration

To make the best use of the tool set one of the following:

  • OPENAI_API_KEY
  • ANTHROPIC_API_KEY
  • GEMINI_API_KEY

in your environment variables so it can use the LLM to generate relevant title automatically based on your current branch commits.

The tool uses some sensible defaults for the models but you can override them in the config file.

See more in docs/config.md.

Usage

gh aipr <other args that gh pr create supports>

This will follow you through interactive create process and your final PR title and body will be automatically generated and set.

About

Small github-cli extension that generates a PR title and a body based on the commits

Topics

Resources

License

Stars

Watchers

Forks

Contributors