← All open source projects

GitHub CLI

cli/cli

GitHub CLI is GitHub’s official command-line tool for issues, checks, releases, and repository work next to git.

Forks 8,612
Author cli
Language Go
License MIT
Synced 2026-06-27

What it is

GitHub CLI is GitHub’s official command-line tool. Its executable name is `gh`, and that is how it is usually called from the terminal.

The project appeared from a simple need: developers already work with git and code in a terminal, but issues, checks, and releases often push them back to the browser.

`gh` moves part of GitHub work into the place where development already happens: issues, checks, branches, releases, actions, and repository information.

How the project is built

The tool supports GitHub.com, GitHub Enterprise Cloud, and GitHub Enterprise Server, with official installation instructions for macOS, Linux, Unix, and Windows.

Inside the repository are Go code, installation documentation, a command manual, tests, and contribution materials for the tool itself.

How people use it

A normal scenario is to authenticate, list issues, create a branch for work, inspect checks, and move to the needed change without context switching.

For repository maintainers, `gh` is useful because repeated operations can be scripted: building a release, checking status, or exporting an issue list.

Practical example

Working with issues and branches from the terminal

This example shows the role of `gh`: some GitHub actions stay next to code and regular git commands.

Language: Bash
gh auth login
gh issue list --label bug
gh pr checkout 42
gh run watch

The project’s strength is its official relationship with GitHub. Commands mirror actual platform concepts rather than guessing at them from the outside.

Strengths

Another advantage is that it works beside normal git. `gh` does not replace version control; it adds a GitHub layer on top.

The limitation is that the tool needs authentication and access rights. In team scripts, it matters which account performs an action.

Limitations

The terminal is also not always better than the browser. For long discussions, design review, or large diffs, the web interface may be more comfortable.

GitHub CLI best fits developers and maintainers who work with GitHub often and want fewer window switches.

Who it fits

For automation, commands should be explicit, and dangerous actions should not hide behind tiny aliases, especially when they change releases or settings.

In the catalog, the project matters as an official tool around a major platform: it makes daily work faster without asking teams to adopt a new service.

A good start is to use `gh` for reading status and navigation first, then add commands that create, close, or publish things.

In teams, `gh` often becomes not a browser replacement, but a quick bridge between local work and GitHub. A developer can inspect check status, move to a branch, open an issue, or create a release from the same environment where tests run. This is especially useful when an action is small, repeatable, and does not require careful reading of a long discussion page.