Skip to content

GitHub CLI

GitHub CLI brings GitHub to your terminal.

Here are some commands that you can try

View Repo

gh repo view ${REPO}

This will allow you to see the repository description & README.md

Example : View elieahd/blogger-hexagonal

gh repo view elieahd/blogger-hexagonal

view repo

Workflows

gh workflow list --repo ${REPO}

Example : List workflows of the repo elieahd/blogger-hexagonal

gh workflow list --repo elieahd/blogger-hexagonal

workflow list

Example : List workflows of the repo elieahd/blogger-hexagonal with formatted JSON output

gh workflow list --repo elieahd/blogger-hexagonal --json id,name

workflow list json todo

Example : List workflows name of the repo elieahd/blogger-hexagonal

gh workflow list --repo elieahd/blogger-hexagonal --json id,name -q '.[].name'

workflow list name

Runs

gh run list --repo ${REPO} --workflow ${WORKFLOW}

Example : List workflows runs of Dependabot Updates in the repo elieahd/blogger-hexagonal

gh run list --repo elieahd/blogger-hexagonal --workflow 'Dependabot Updates'

workflow runs

Pull Requests

gh pr list --repo ${REPO} --state open

Example : List all opened PRs on elieahd/blogger-hexagonal

gh pr list --repo elieahd/blogger-hexagonal --state open

opened prs

Example : List all assigned PRs on elieahd/blogger-hexagonal

gh pr status --repo elieahd/blogger-hexagonal 

assigned prs

Checks on PRs

gh pr checks ${PR} --repo ${REPO}

Example : List all checks on a specific PR on elieahd/blogger-hexagonal

gh pr checks 12 --repo elieahd/blogger-hexagonal

pr cheks

Here is the full list of commands