OS Manuals

gh(1)

gh - GitHub CLI

GH(1) GitHub CLI manual GH(1)

gh - GitHub CLI

gh <command> <subcommand> [flags]

Work seamlessly with GitHub from the command line.

Authenticate gh and git with GitHub

Open repositories, issues, pull requests, and more in the browser

Connect to and manage codespaces

Work with GitHub Discussions (preview)

Manage gists

Manage issues

Manage organizations

Manage pull requests

Work with GitHub Projects.

Manage releases

Manage repositories

Install and manage agent skills (preview)

Manage GitHub Actions caches

View details about workflow runs

View details about GitHub Actions workflows

Work with agent tasks (preview)

Create command shortcuts

Make an authenticated GitHub API request

Work with artifact attestations

Generate shell completion scripts

Manage configuration for gh

Run the GitHub Copilot CLI (preview)

Manage gh extensions

Manage GPG keys

Manage labels

View third-party license information

Execute previews for gh features

View info about repo rulesets

Search for repositories, issues, and pull requests

Manage GitHub secrets

Manage SSH keys

Print information about relevant issues, pull requests, and notifications across repositories

Manage GitHub Actions variables

Show gh version

0: Successful execution

1: Error

2: Command canceled

4: Authentication required

NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.

$ gh issue create
$ gh repo clone cli/cli
$ gh pr checkout 321
Sep 2026

gh 2.102.0-r0 · os · ingested 2026-10-01