gh-config
manage GitHub CLI settings and preferences
TLDR
Get config value
$ gh config get [key]
Set config value$ gh config set [key] [value]
List all configuration$ gh config list
Set default editor$ gh config set editor [vim]
Set default browser$ gh config set browser [firefox]
SYNOPSIS
gh config command [options]
DESCRIPTION
gh config manages configuration for the GitHub CLI. It controls behavior settings like preferred editor, browser, default prompts, and protocol preferences.Configuration is stored per-host, allowing different settings for github.com and GitHub Enterprise instances. Settings can be environment-specific or global.Common settings include git_protocol (https/ssh), editor, browser, and pager.
PARAMETERS
get KEY
Get a configuration value.set KEY VALUE
Set a configuration value.list
List all configuration settings.--host HOSTNAME
Apply to specific GitHub host.--help
Display help information.
CONFIGURATION
~/.config/gh/config.yml
Main configuration file storing user preferences, default settings, and per-host configurations.
INSTALL
sudo apt install gh
sudo dnf install gh
sudo pacman -S github-cli
sudo apk add github-cli
sudo zypper install gh
brew install gh
nix profile install nixpkgs#gh
CAVEATS
Config stored in ~/.config/gh/config.yml. Environment variables may override settings. Some settings require reauthentication to take effect.
HISTORY
gh config is part of the GitHub CLI, providing user customization following XDG Base Directory conventions on Unix systems.
