A lightweight GitHub CLI extension that seamlessly combines gh pr list
and gh pr checkout
into a single interactive workflow.
gh-po
(PR + Checkout) is a simple wrapper around GitHub CLI commands that streamlines the process of viewing and checking out pull requests. It displays all available pull requests in your repository and allows you to immediately checkout any PR by entering its number.
When working with multiple pull requests, developers often need to:
- Run
gh pr list
to see available PRs - Identify the PR number they want to work on
- Run
gh pr checkout <number>
to switch to that PR
This extension combines these steps into a single command, reducing context switching and making PR management more efficient. The interactive prompt makes it easy to quickly jump between different pull requests during code reviews or when switching between multiple work streams.
- GitHub CLI must be installed and authenticated
gh extension install namidapoo/gh-po
gh po
This will:
- Display a list of all pull requests in the current repository
- Prompt you to enter the number of the PR you want to checkout
- Automatically checkout the selected PR
$ gh po
#123 Feature: Add user authentication feature-auth
#122 Fix: Memory leak in data parser fix-memory-leak
#121 Update: Documentation update-docs
? Type the number of PR to checkout? ... 122
✓ Checked out pull request #122 (fix-memory-leak)
The extension inherits all authentication and repository context from the GitHub CLI, so it works seamlessly with your existing gh
configuration.