Skip to content
Commitpedia
Log in Join & edit

GitHub CLI (gh)

GitHub's official command-line tool. Create and check out pull requests, manage issues, view Actions runs, and sign in to GitHub from the terminal.

Drafted with AI from official documentation. Scripts were run in a test environment and repository links verified. Awaiting a human check. Did it work for you? Last edited Outdated?

Edit history of GitHub CLI (gh): 1 recorded edit
Edit history · 1 edit
Type
Repo
Edits
1
Editors
1
First issued
15 Oct 2026
Last edit
15 Oct 2026
Source
cli/cli

cli/cli

Stars
47.4k
Forks
9.5k
Language
Go
Licence
MIT
Last push
1 Dec 2026

On GitHub: GitHub’s official command line tool

Open on GitHub

gh brings GitHub features into the terminal next to Git. Git handles commits and branches; gh handles things that only exist on GitHub, such as pull requests, issues, releases, and workflow runs.

A few commands cover most daily use: gh auth login to sign in (it can also set Git up to use those credentials over HTTPS), gh pr create to open a pull request from the current branch, gh pr checkout 123 to test someone else’s PR locally, gh pr status for an overview, and gh run watch to follow a GitHub Actions run.

gh api calls any GitHub REST or GraphQL endpoint with your login, which makes small automation scripts easy. Install instructions for each platform are linked from the README.

Did this work for you?

No votes yet. Be the first.

If it did not work, the report form below tells the editors what went wrong.

See also

  • 0038 The pull request workflow on GitHub A pull request asks to merge your branch into another one, with review and automated checks in between. This is the whole… Beginner · Step by step · Any system Article Pull requests 15 Oct 2026
  • 0044 A starter set of Git aliases Short names for the Git commands you type all day, such as a one-line status, a graph log, and a safe force… Beginner · Cheat sheet · Linux, macOS, Windows Script Git tools 15 Oct 2026
  • 0262 Make your first pull request: Git and GitHub from first commit to merged change A complete beginner's path through Git and GitHub: set up Git, make commits, ignore files, use branches, push to GitHub, open a… Beginner · Guided project · Any system Article Branching & rebasing · Pull requests · Setup 15 Oct 2026
  • 0314 What is a pull request? A pull request asks teammates to review and merge the changes on your branch into the main branch. Beginner · Explains an idea · Any system Article Pull requests 15 Oct 2026
  • 0315 What is open source? Open source software is software whose code anyone can read, change and share under a licence that allows it. Beginner · Explains an idea · Any system Article Pull requests 15 Oct 2026

History

Every saved edit is kept. The plot on the sleeve draws one line per edit. Open any edit to see exactly what changed.

  1. Dominik +695 chars

Report a problem

Something wrong, unsafe or copied? Tell the editors.
What is wrong?