Cheat Sheet
The commands you keep forgetting, with a one-line description and a real example you can copy - 629 across 38 tools. Pick a tool in the sidebar, or search across all of them.
Showing GitHub CLI (gh). Choose another tool in the sidebar, or search all 629 commands.
GitHub CLI (gh)
Do GitHub from the terminal - PRs, issues, repos, releases, CI.
| Command | What it does | Example |
|---|---|---|
gh auth login | Sign in to GitHub. | gh auth login |
gh repo clone | Clone a repository. | gh repo clone cli/cli |
gh repo create | Create a new repository. | gh repo create myapp --public |
gh repo view | View a repo (--web opens the browser). | gh repo view --web |
gh pr create | Open a pull request. | gh pr create --fill |
gh pr list | List open pull requests. | gh pr list |
gh pr checkout | Check out a PR branch locally. | gh pr checkout 42 |
gh pr merge | Merge a pull request. | gh pr merge 42 --squash |
gh issue create | Open an issue. | gh issue create --title "Login bug" |
gh issue list | List issues, filtered. | gh issue list --label bug |
gh release create | Cut a release with notes. | gh release create v1.2.0 --generate-notes |
gh run list | List recent CI runs. | gh run list |
gh run watch | Watch a CI run live. | gh run watch |