← Back to Mission Control

Command Interface

10 min read

GitHub CLI

Mission Phase 26 • Difficulty: Intermediate

GitHub from Your Terminal

GitHub CLI (gh) brings GitHub functionality to your terminal—create PRs, manage issues, and more without leaving the command line.

Installation

macOS:

brew install gh

Windows:

winget install GitHub.cli

Linux: See github.com/cli/cli#installation

Authentication

gh auth login

Follow prompts to authenticate with GitHub.

Common Commands

Create Repository

gh repo create my-project --public

Clone Repository

gh repo clone username/repository

Create Pull Request

gh pr create --title "Add feature" --body "Description"

List Pull Requests

gh pr list

View PR

gh pr view 123

Create Issue

gh issue create --title "Bug report"

List Issues

gh issue list

Workflows

View and manage GitHub Actions:

gh workflow list
gh run list
gh run view

Why Use GitHub CLI?

Next: Cargo Hold

GitHub CLI supercharges your workflow. Next, learn git stash for temporarily saving work.