🐙
Cloud CLI

GitHub CLI (gh)

Manage GitHub repos, PRs, and Actions from the terminal

🐧 Linux🍎 Mac🪟 Windows📋 Quick reference →
Reviewed: Tested on: Kubernetes 1.29 · Terraform 1.8 · Ubuntu 22.04

What is this?

GitHub CLI (gh) lets you create repos, open PRs, and trigger Actions without opening the browser.

📥

Step 01

Install GitHub CLI (gh)

(01)Install GitHub CLI (gh)

Linux
1(type -p wget >/dev/null || sudo apt-get install wget) \
2&& sudo mkdir -p -m 755 /etc/apt/keyrings \
3&& wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
4&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list \
5&& sudo apt-get update && sudo apt-get install -y gh
⚙️

Step 02

Configure GitHub CLI (gh)

(01)Configure GitHub CLI (gh)

Linux
1gh auth login
2gh repo clone owner/repo

Step 03

Verify

(01)Verify installation

Linux
1gh --version
2gh auth status