skip to content
ccdocs

cc pr

GitHub pull request workflow — list, create, view, merge, checkout, and check PRs.

Requires the gh CLI with gh auth login completed.

Usage

cc pr                    # interactive TUI picker → open in browser
cc pr list               # table of your open PRs
cc pr create [base]      # create PR from current branch
cc pr view <number>      # show PR details
cc pr merge <number>     # merge a PR
cc pr checkout <number>  # checkout PR branch locally
cc pr checks <number>    # show CI status checks

Actions

list (default)

Fetches your open PRs via gh search prs. Displays them in a TUI picker — arrow keys to navigate, Enter to open in browser.

create

Creates a PR from the current branch. Prompts for base branch and title interactively.

FlagDescription
--draftCreate as draft PR
--webOpen the compare URL in browser instead of creating via CLI

If a base branch is passed as target, skips the base prompt:

cc pr create staging          # base = staging, prompts for title
cc pr create --draft 19.0     # draft PR against 19.0
cc pr create --web main       # open compare URL in browser

view

Shows PR details: state, review decision, branch, author, diff stats, and URL.

merge

Merges a PR. Prompts for merge method (squash, merge, or rebase).

checkout

Checks out the PR branch locally via gh pr checkout.

checks

Shows CI commit statuses for the PR's head branch.

Flags

FlagDescription
--jsonOutput open PRs as JSON (with list or default action)
--draftCreate PR as draft (with create)
--webOpen compare URL in browser (with create)

Examples

cc pr                    # pick an open PR to open in browser
cc pr list               # print table of open PRs
cc pr --json             # JSON output
cc pr create 19.0        # create PR: current branch → 19.0
cc pr create --draft     # create draft PR (prompts for base + title)
cc pr view 38            # show PR #38 details
cc pr merge 38           # merge PR #38
cc pr checkout 38        # checkout PR #38 branch
cc pr checks 38          # show CI checks for PR #38

On this page