gh - Man Page

GitHub CLI

Examples (TL;DR)

Synopsis

gh <command> <subcommand> [flags]

Description

Work seamlessly with GitHub from the command line.

Core Commands

gh-browse(1)

Open the repository in the browser

gh-codespace(1)

Connect to and manage your codespaces

gh-gist(1)

Manage gists

gh-issue(1)

Manage issues

gh-pr(1)

Manage pull requests

gh-release(1)

Manage GitHub releases

gh-repo(1)

Create, clone, fork, and view repositories

Actions Commands

gh-run(1)

View details about workflow runs

gh-workflow(1)

View details about GitHub Actions workflows

Additional Commands

gh-alias(1)

Create command shortcuts

gh-api(1)

Make an authenticated GitHub API request

gh-auth(1)

Login, logout, and refresh your authentication

gh-completion(1)

Generate shell completion scripts

gh-config(1)

Manage configuration for gh

gh-extension(1)

Manage gh extensions

gh-gpg-key(1)

Manage GPG keys

gh-secret(1)

Manage GitHub secrets

gh-ssh-key(1)

Manage SSH keys

Options

--version

Show gh version

Example

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

Referenced By

gh-alias(1), gh-api(1), gh-auth(1), gh-browse(1), gh-codespace(1), gh-completion(1), gh-config(1), gh-extension(1), gh-gist(1), gh-gpg-key(1), gh-issue(1), gh-pr(1), gh-release(1), gh-repo(1), gh-run(1), gh-secret(1), gh-ssh-key(1), gh-workflow(1).

Jan 2022 GitHub CLI manual