Skip to content

gh

OfficialAgent-readyGit & GitHubGit

Pull requests, issue triage, and github actions from the terminal.

The official CLI from GitHub. Pull requests, issue triage, and github actions from the terminal. Start with `gh auth login` and go from there. Supports structured output — good for scripts and agents.

Task fit

pull requests, issue triage, and github actions from the terminal.

Lane

Review PRs, triage issues, inspect workflows, and keep repo work agent-safe.

Operator brief

Use gh for pull requests, issue triage, and github actions from the terminal.

Run `gh repo clone vercel/next.js` to see it in action.

Repository family

GitHub

First trust check

The command shows the signed-in GitHub account and scopes.

Safe first loop

Install, verify, then run one real command.

GitHub review loop

Install command

$ brew install gh

Operator pack

Copy or export the working notes for this CLI before handing it to an agent.

Verify

$ gh auth status

The command shows the signed-in GitHub account and scopes.

First real command

$ gh auth login && gh repo clone vercel/next.js

First steps

  1. 01Install gh.
  2. 02Run `gh auth status` first.
  3. 03Start with `gh auth login && gh repo clone vercel/next.js`.
  4. 04Authenticate gh before asking the agent to do real work.

When to use / hold off when

Best for

pull requests, issue triage, and github actions from the terminal.

Use this when

You're on GitHub and want the official terminal experience.

Hold off when

You need something that works offline or without an account.

Trust and constraints

automation-ready100/100
OfficialInstall readyAutomation-ready
JSON outputYes
Non-interactiveYes
CI-friendlyYes

Why operators pick it

  • gh fits git & github well, especially for pull requests, issue triage, and github actions from the terminal.
  • It is the official CLI from GitHub.
  • Good for scripts and agents.

Constraints

  • Sign in before real work.
  • Needs network access.

Facts and links

Install withbrew
Homebrew installs (30d)343.3K
GitHub stars43.4K
LicenseMIT
UpdatedMar 25, 2026