GitHub CLI
Back to Development
GitHub CLIIntermediate12 min

GitHub CLI Workflow: Pull Requests, Issues, and Actions from Terminal

GitHub from the Terminal

Master the GitHub CLI (gh) for creating PRs, managing issues, checking Actions status, and cloning repos — all without leaving the terminal.

The GitHub CLI (gh) brings pull requests, issues, Actions, and repos to your terminal — no browser needed for routine GitHub tasks.

By the end of this 12 min guide, you'll have a working GitHub CLI setup and practical GitHub CLI workflows you can use immediately.

Installing & Authenticating gh

Install GitHub CLI:

brew install gh
Tip: Verify the installation with gh --version or gh -V after installing.

PR & Issue Workflow

Run gh auth login to authenticate. Then use gh pr, gh issue, gh repo, and gh run subcommands for everything GitHub.

Here's a foundational configuration to start with:

# Create PR from CLI
gh pr create --title "Fix: login bug" --body "Resolves #123"
gh pr checkout 42  # checkout PR #42 locally
gh issue list --assignee @me

Actions & Workflow Runs

With GitHub CLI configured, these GitHub CLI-specific workflows will save you time every day:

Pro tip: Don't try to adopt everything at once. Start with gh pr create open a PR from current branch and add more as it becomes habit.

Extensions & Aliases

Once you're comfortable with GitHub CLI basics, these advanced techniques will transform your GitHub CLI workflow:

API Rate Limit & Auth Issues

Here are the most common GitHub CLI issues and how to fix them:

gh CLI Mastery

Congratulations — you now have a solid GitHub CLI foundation. Here's where to go next:

← Previousbat: A Cat Replacement with Syntax Highlighting and Git IntegrationNext →git-delta: Beautiful Syntax-Highlighted Diffs in Your Terminal