macos-setup
🐱 Source ☕️ Java SampleGo Sample Angular Sample
  • Mac Setup
  • Getting Started
    • Xcode
    • Homebrew
    • System Preferences
    • Essentials
    • Dotfiles
  • Applications
    • Ghostty
    • Sublime-text
    • JetBrains
    • VSCode
    • Xcode
    • Marta
    • Benthos
    • OrbStack
    • Traefik
    • n8n
  • Platforms
    • Java
    • Node
      • Bub
      • NPM
      • PNPM
      • Turborepo
    • GoLang
    • Rust
    • Python
      • Testing
      • Agno AI
  • DevOps
    • Development Workflow
      • Git
        • GitHub CLL
      • GitOps
      • Documentation
      • mkcert
      • YubiKey
    • Monorepo
    • dnsmasq
    • Docker
    • Skaffold
    • Kubernetes
    • Helm
    • Kustomize
    • kustomizer
    • Terraform
    • Security
    • Cloud
      • gcloud
      • azure
      • aws
  • Tips
    • Git
    • MacOS
Powered by GitBook
On this page
  • Install
  • Configuration
  • Usage
  • repos
  • alias
  • Miscellaneous
  • Extensions
  • Recommended Extensions

Was this helpful?

Edit on GitHub
  1. DevOps
  2. Development Workflow
  3. Git

GitHub CLL

PreviousGitNextGitOps

Last updated 2 years ago

Was this helpful?

is GitHub CLI brings GitHub to your terminal.

Install

brew install gh

Configuration

# authenticate with your GitHub account
# Alternatively, gh will respect the GITHUB_TOKEN environment variable
gh auth login 
# GitHub Enterprise
gh auth login --hostname <hostname>

# verify
gh auth status
# Print a list of configuration keys and values
gh config list [flags]
# rint the value of a given configuration key
gh config get <key> [flags]
# Update configuration with a value for the given key
gh config set editor "code --wait"

Usage

repos

# Cloning a repository
gh repo clone cli/cli
# Sync local repository from remote parent
gh repo sync

alias

# Aliases can be used to make shortcuts for gh commands or to compose multiple commands.
gh alias set <alias> <expansion> [flags]
$ gh alias set homework 'issue list --assignee @me'
$ gh homework

Miscellaneous

# Open the GitHub repository in the web browser.
gh browse
# run github actions
gh workflow view
gh workflow list
# publish file 'hello.py' as a public gist
gh gist create --public hello.py
# List all issues
gh issue list
# List all PRs
gh pr list

Extensions

Recommended Extensions

gh extension install seachicken/gh-poi
gh extension install dlvhdr/gh-dash
gh extension install carlsberg/gh-releaser
gh extension install andyfeller/gh-dependency-report

Usage

# gh dependency-report xmlking

Viewing installed extensions

gh extension list

To install an extension in development from the current directory, use . as the value for the repository parameter.

gh extension install <repository> [flags]

gh extension install owner/gh-extension
gh extension install https://git.example.com/owner/gh-extension
gh extension install .

Updating extensions

gh extension upgrade `extension`
gh extension upgrade --all

Uninstalling extensions

gh extension remove `extension`

Extensions

gh dash

See the list of available extensions at

gh
https://github.com/topics/gh-extension
gh-dash
gh-releaser
gh-dependency-report