til

Use GitHub CLI

Install source

for Debian, Ubuntu Linux (apt)

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0
sudo apt-add-repository https://cli.github.com/packages
sudo apt update
sudo apt install gh

Upgrade:

sudo apt update
sudo apt install gh

Authentication

gh auth login

Setting an editor

gh config set editor <editor>

Setting your git protocol

gh config set git_protocol { ssh | https }

Disable interactivity

gh config set prompt disabled

Extending the CLI

  1. Create shorthands using gh alias set
  2. Make custom API queries using gh api
  3. Use environment variables

References