gh
Work seamlessly with GitHub. Some subcommands such as `config` have their own usage documentation.
More info →Subcommands (40)
This command is an alias of `gh accessibility`.
Learn about GitHub CLI's accessibility experiences.
This command is an alias of `gh agent-task`.
Manage GitHub CLI command aliases.
Make authenticated HTTP requests to the GitHub API and print the response.
This command is an alias of `gh attestation`.
Download and verify artifact attestations to ensure their integrity and provenance.
Authenticate with a GitHub host.
Open a GitHub repository in the browser or print the URL.
Manage GitHub Actions caches.
Connect and manage your codespaces in GitHub.
Generate shell completion scripts for GitHub CLI commands.
Change configuration for GitHub CLI.
Interact with GitHub Copilot. Note: Deprecated in favor of `copilot`.
This command is an alias of `gh codespace`.
Display help about environment variables for the GitHub CLI command.
Manage extensions for the GitHub CLI.
Formatting options for JSON data exported from gh GitHub CLI command.
Work with GitHub Gists.
Display help about the GitHub CLI command.
Manage GitHub issues.
Work with GitHub labels.
Display help about MinTTY integration for the GitHub CLI command.
Work with GitHub organizations.
Manage GitHub pull requests. Some subcommands such as `create` have their own usage documentation.
Preview GitHub CLI programs for testing and development purposes. These commands are unstable and may change at any time.
Work with GitHub Projects.
Display a reference about the GitHub CLI command.
Manage GitHub releases.
Work with GitHub repositories.
This command is an alias of `gh ruleset`.
Manage GitHub repository rulesets.
View, run, and watch recent GitHub Actions workflow runs.
Extension for GitHub CLI that runs animated terminal screensavers. See also: `gh extension`.
Search across all of GitHub.
Manage GitHub secrets.
Generate a 3D model of your GitHub contribution history. By default, it will create a `{username}-{year}-github-skyline.stl` file in the current directory.
Check the status of subscribed repositories on GitHub.
Manage GitHub Actions and Dependabot variables.
List, view, and run GitHub Actions workflows.
Options (4)
booleanCreate a new issue
gh issue {{[new|create]}}booleanView and filter the open issues of the current repository
gh issue {{[ls|list]}}-w, --webbooleanView an issue in the default web browser
gh issue view {{[-w|--web]}} {{issue_number|url}}booleanCheck out a specific pull request locally
gh {{[co|pr checkout]}} {{pr_number|url|branch}}Examples (8)
Clone a GitHub repository locally
gh repo clone owner/repositoryCreate a new issue
gh issue [new|create]View and filter the open issues of the current repository
gh issue [ls|list]Create a pull request
gh pr [new|create]View a pull request in the default web browser
gh pr view [-w|--web] pr_number|url|branchCheck out a specific pull request locally
gh [co|pr checkout] pr_number|url|branchCheck the status of a repository's pull requests
gh pr status