Skip to content

pr

The pr command creates or updates pull requests for branches in your stack. It automatically sets the correct base branch and generates appropriate PR titles and descriptions.

Usage

bash
pq pr [BRANCH_NAME] [OPTIONS]

Arguments

ArgumentDescription
BRANCH_NAMEOptional branch to start from

Options

OptionDescription
--push / --no-pushPush or skip unpushed branches without prompting
--draft / --no-draftCreate PRs as drafts or ready for review without prompting
--title TEXTSet the target branch's PR title
--body TEXTSet the target branch's PR body
--body-file PATHRead the target PR body from a file; use - for stdin
--reviewer USERNAMEAdd a reviewer; repeat for multiple reviewers
--no-reviewersCreate the target PR without reviewers or a reviewer prompt
--defaultsUse generated titles, empty bodies, and no reviewers without metadata prompts
--yes, -ySkip final creation confirmations
--jsonOutput machine-readable JSON and disable remaining prompts

Examples

Creating a PR for the Current Branch

bash
pq pr

Creating a PR for a Specific Branch

bash
pq pr feature-auth-ui

Creating Draft PRs

When you want to create PRs as drafts (useful for work-in-progress):

bash
# Create all PRs in the stack as drafts
pq pr --draft

# Create drafts for a specific branch and its dependencies
pq pr feature-auth-ui --draft

Interactive Draft Selection

When running without --draft or --no-draft, you'll be prompted for each PR whether to create it as a draft:

bash
pq pr
# You'll be asked: "Is this a draft PR? (y/N)"

Fully Non-interactive Creation

bash
pq pr feature-auth-ui \
  --push \
  --no-draft \
  --defaults \
  --yes \
  --json

--defaults also covers any ancestor PRs Panqake creates while walking the stack. You can still use --title, --body/--body-file, and --reviewer to override the generated metadata for the target branch.

Pipe a description through stdin with --body-file -:

bash
printf 'Implements the authentication UI.\n' | \
  pq pr feature-auth-ui --body-file - --no-reviewers --yes --json

INFO

This command uses GitHub CLI (gh) under the hood, so you must have it installed and authenticated.

Released under the MIT License.