---
name: "gh"
section: "1"
platform: "linux"
package: "github-cli"
version: "2.102.1-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://carta.tech/man/gh"
---

# gh(1)

GitHub CLI

## NAME

gh - GitHub CLI

## SYNOPSIS

**gh \<command\> \<subcommand\> \[flags\]**

## DESCRIPTION

Work seamlessly with GitHub from the command line.

## CORE COMMANDS

- **[gh-auth(1)](/man/gh-auth/1.md)**

  Authenticate gh and git with GitHub

- **[gh-browse(1)](/man/gh-browse/1.md)**

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

- **[gh-codespace(1)](/man/gh-codespace/1.md)**

  Connect to and manage codespaces

- **[gh-discussion(1)](/man/gh-discussion/1.md)**

  Work with GitHub Discussions (preview)

- **[gh-gist(1)](/man/gh-gist/1.md)**

  Manage gists

- **[gh-issue(1)](/man/gh-issue/1.md)**

  Manage issues

- **[gh-org(1)](/man/gh-org/1.md)**

  Manage organizations

- **[gh-pr(1)](/man/gh-pr/1.md)**

  Manage pull requests

- **[gh-project(1)](/man/gh-project/1.md)**

  Work with GitHub Projects.

- **[gh-release(1)](/man/gh-release/1.md)**

  Manage releases

- **[gh-repo(1)](/man/gh-repo/1.md)**

  Manage repositories

- **[gh-skill(1)](/man/gh-skill/1.md)**

  Install and manage agent skills (preview)

## GITHUB ACTIONS COMMANDS

- **[gh-cache(1)](/man/gh-cache/1.md)**

  Manage GitHub Actions caches

- **[gh-run(1)](/man/gh-run/1.md)**

  View details about workflow runs

- **[gh-workflow(1)](/man/gh-workflow/1.md)**

  View details about GitHub Actions workflows

## ADDITIONAL COMMANDS

- **[gh-agent-task(1)](/man/gh-agent-task/1.md)**

  Work with agent tasks (preview)

- **[gh-alias(1)](/man/gh-alias/1.md)**

  Create command shortcuts

- **[gh-api(1)](/man/gh-api/1.md)**

  Make an authenticated GitHub API request

- **[gh-attestation(1)](/man/gh-attestation/1.md)**

  Work with artifact attestations

- **[gh-completion(1)](/man/gh-completion/1.md)**

  Generate shell completion scripts

- **[gh-config(1)](/man/gh-config/1.md)**

  Manage configuration for gh

- **[gh-copilot(1)](/man/gh-copilot/1.md)**

  Run the GitHub Copilot CLI (preview)

- **[gh-extension(1)](/man/gh-extension/1.md)**

  Manage gh extensions

- **[gh-gpg-key(1)](/man/gh-gpg-key/1.md)**

  Manage GPG keys

- **[gh-label(1)](/man/gh-label/1.md)**

  Manage labels

- **[gh-licenses(1)](/man/gh-licenses/1.md)**

  View third-party license information

- **[gh-preview(1)](/man/gh-preview/1.md)**

  Execute previews for gh features

- **[gh-ruleset(1)](/man/gh-ruleset/1.md)**

  View info about repo rulesets

- **[gh-search(1)](/man/gh-search/1.md)**

  Search for repositories, issues, and pull requests

- **[gh-secret(1)](/man/gh-secret/1.md)**

  Manage GitHub secrets

- **[gh-ssh-key(1)](/man/gh-ssh-key/1.md)**

  Manage SSH keys

- **[gh-status(1)](/man/gh-status/1.md)**

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

- **[gh-variable(1)](/man/gh-variable/1.md)**

  Manage GitHub Actions variables

## OPTIONS

- **--version**

  Show gh version

## EXIT CODES

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.

## EXAMPLE

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