GH(1) GitHub CLI manual GH(1)

# [NAME](#NAME)

gh - GitHub CLI

# [SYNOPSIS](#SYNOPSIS)

**gh &lt;command&gt; &lt;subcommand&gt; \[flags]**

# [DESCRIPTION](#DESCRIPTION)

Work seamlessly with GitHub from the command line.

# [CORE COMMANDS](#CORE_COMMANDS)

[**gh-auth(1)**](#gh_auth%281%29)

Authenticate gh and git with GitHub

[**gh-browse(1)**](#gh_browse%281%29)

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

[**gh-codespace(1)**](#gh_codespace%281%29)

Connect to and manage codespaces

[**gh-discussion(1)**](#gh_discussion%281%29)

Work with GitHub Discussions (preview)

[**gh-gist(1)**](#gh_gist%281%29)

Manage gists

[**gh-issue(1)**](#gh_issue%281%29)

Manage issues

[**gh-org(1)**](#gh_org%281%29)

Manage organizations

[**gh-pr(1)**](#gh_pr%281%29)

Manage pull requests

[**gh-project(1)**](#gh_project%281%29)

Work with GitHub Projects.

[**gh-release(1)**](#gh_release%281%29)

Manage releases

[**gh-repo(1)**](#gh_repo%281%29)

Manage repositories

[**gh-skill(1)**](#gh_skill%281%29)

Install and manage agent skills (preview)

# [GITHUB ACTIONS COMMANDS](#GITHUB_ACTIONS_COMMANDS)

[**gh-cache(1)**](#gh_cache%281%29)

Manage GitHub Actions caches

[**gh-run(1)**](#gh_run%281%29)

View details about workflow runs

[**gh-workflow(1)**](#gh_workflow%281%29)

View details about GitHub Actions workflows

# [ADDITIONAL COMMANDS](#ADDITIONAL_COMMANDS)

[**gh-agent-task(1)**](#gh_agent_task%281%29)

Work with agent tasks (preview)

[**gh-alias(1)**](#gh_alias%281%29)

Create command shortcuts

[**gh-api(1)**](#gh_api%281%29)

Make an authenticated GitHub API request

[**gh-attestation(1)**](#gh_attestation%281%29)

Work with artifact attestations

[**gh-completion(1)**](#gh_completion%281%29)

Generate shell completion scripts

[**gh-config(1)**](#gh_config%281%29)

Manage configuration for gh

[**gh-copilot(1)**](#gh_copilot%281%29)

Run the GitHub Copilot CLI (preview)

[**gh-extension(1)**](#gh_extension%281%29)

Manage gh extensions

[**gh-gpg-key(1)**](#gh_gpg_key%281%29)

Manage GPG keys

[**gh-label(1)**](#gh_label%281%29)

Manage labels

[**gh-licenses(1)**](#gh_licenses%281%29)

View third-party license information

[**gh-preview(1)**](#gh_preview%281%29)

Execute previews for gh features

[**gh-ruleset(1)**](#gh_ruleset%281%29)

View info about repo rulesets

[**gh-search(1)**](#gh_search%281%29)

Search for repositories, issues, and pull requests

[**gh-secret(1)**](#gh_secret%281%29)

Manage GitHub secrets

[**gh-ssh-key(1)**](#gh_ssh_key%281%29)

Manage SSH keys

[**gh-status(1)**](#gh_status%281%29)

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

[**gh-variable(1)**](#gh_variable%281%29)

Manage GitHub Actions variables

# [OPTIONS](#OPTIONS)

[**--version**](#version)

Show gh version

# [EXIT CODES](#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](#EXAMPLE)

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

Oct 2026

---

Document: gh(1) from gh 2.102.0-r1 (Chainguard OS)
Source: https://github.com/cli/cli
