GitHub CLI
Overview
GitHub CLI, commonly invoked as gh, is GitHub’s official command-line tool for working with repositories, pull requests, issues, releases, and Actions from a terminal.
It matters because it brings common GitHub workflows into shell-based development environments, making it easier to automate tasks and work without leaving the command line.
What GitHub CLI Does
GitHub CLI brings common GitHub tasks into a terminal workflow.
Typical use cases include:
- opening and reviewing pull requests
- creating and triaging issues
- inspecting Actions runs
- working with releases
- cloning repositories and repository metadata
- scripting GitHub operations from the shell
That makes gh especially useful when repository work is already happening close to Git, the CLI, and local automation scripts.
Why Teams Use gh
Teams often use GitHub CLI because it reduces context-switching between browser and terminal workflows.
It is useful for:
- shell-based review and release work
- repeatable scripting
- local developer automation
- fast access to repository actions and metadata
For many developers, it becomes the command-line layer for GitHub in the same way git is the command-line layer for repository history.
GitHub CLI vs Git
gh and Git solve different problems.
- Git manages repository history and local version control.
- GitHub CLI manages hosted GitHub platform workflows.
That distinction matters because a developer may use both commands constantly in the same session while they operate on different layers of the workflow.
Extensions and Automation
GitHub CLI supports extension-based workflows and scripted usage patterns.
That makes it relevant when teams want:
- custom command extensions
- shell automation around GitHub operations
- repository tasks embedded into larger scripts or tooling
This is one reason GitHub CLI sits close to github.md, ci-cd, and release management workflows.
Frequently Asked Questions
Is GitHub CLI the same as Git?
No. gh is for GitHub platform workflows, while Git is the underlying version control system.
Do you need a browser if you use GitHub CLI?
Not for many common tasks. That is one of its main advantages, though some workflows can still hand off to browser-based review or auth flows.
Is GitHub CLI only for advanced users?
No. It helps advanced automation users, but it is also useful for everyday pull request, issue, and release tasks.
Resources
- Website: GitHub CLI
- Docs: GitHub CLI Manual
- Repo: GitHub CLI on GitHub
- Extensions: GitHub CLI Extensions