LinuxCommandLibrary

gh-help

Display GitHub CLI help information

TLDR

Display general help

$ gh help
copy

Display help for the gh help subcommand
$ gh help --help
copy

Display help about environment variables that can be used with gh
$ gh help environment
copy

Display a markdown reference of all gh commands
$ gh help reference
copy

Display help about formatting JSON output from gh using jq
$ gh help formatting
copy

Display help about using gh with MinTTY
$ gh help mintty
copy

Display help for a subcommand
$ gh help [subcommand]
copy

Display help for a subcommand action
$ gh help [pr] [create]
copy

SYNOPSIS

`gh-help` [command]
Alternative usage: `gh help` [command]
Also: `gh` command `--help`

PARAMETERS

command
    The optional name of a specific `gh` command or subcommand for which to display detailed help information. If omitted, `gh-help` provides general help for the `gh` CLI.

DESCRIPTION

`gh-help` provides comprehensive documentation for the GitHub CLI (`gh`) commands and their associated flags. While often conceptualized as a standalone command, it is typically invoked via `gh help` or by appending `--help` to any `gh` command (e.g., `gh repo create --help`). This utility is indispensable for understanding how to use `gh` functionalities directly from the terminal, eliminating the need to consult external documentation. It offers detailed explanations of command purposes, syntax, arguments, options, and often includes practical examples. The help system is context-aware, allowing users to retrieve general `gh` information or specific details for any `gh` subcommand. It is a fundamental component of the `gh` CLI, empowering users to efficiently interact with GitHub repositories, issues, pull requests, and more, all from the command line.

CAVEATS

The command `gh-help` is not a standalone executable on most Linux systems; it primarily refers to the help functionality invoked through `gh help` or `gh --help`. This functionality requires the GitHub CLI (`gh`) to be installed and configured on the system. The displayed help content is specific to the version of the `gh` CLI installed, so it may vary across different installations or updates.

GETTING HELP FOR FLAGS

To view help specifically for the flags and options of a `gh` command, append `--help` directly to the command, for example: `gh pr create --help`. This provides a detailed breakdown of all available flags, their types, and descriptions relevant to that particular command.

INTERACTIVE HELP AND AUTOCOMPLETE

The `gh` CLI often integrates well with shell autocompletion features (e.g., for Bash, Zsh, Fish), which can suggest commands and flags as you type. While not directly part of `gh-help`, this complements the help system by guiding users towards correct syntax and available options.

HISTORY

The `gh` command-line interface, which includes the `help` functionality, was first publicly released in 2020. From its inception, a robust and integrated help system was a core design principle, following common CLI best practices established by tools like `git` and `docker`. The `help` command has consistently provided users with immediate access to documentation, evolving with the CLI's features to ensure up-to-date guidance for new commands and functionalities.

SEE ALSO

gh(1), man(1), info(1)

Copied to clipboard