gh-alias - Man Page
Create command shortcuts
Examples (TL;DR)
- List all the aliases
ghis configured to use:gh alias [ls|list] - Create a
ghsubcommand alias:gh alias set pv 'pr view' - Set a shell command as a
ghsubcommand:gh alias set [-s|--shell] alias_name command - Delete a command shortcut:
gh alias delete alias_name - Display the subcommand help:
gh alias
Synopsis
gh alias <command> [flags]
Description
Aliases can be used to make shortcuts for gh commands or to compose multiple commands.
Run gh help alias set to learn more.
Available Commands
- gh-alias-delete(1)
Delete set aliases
- gh-alias-import(1)
Import aliases from a YAML file
- gh-alias-list(1)
List your aliases
- gh-alias-set(1)
Create a shortcut for a gh command
Exit Codes
0: Successful execution
1: Error
2: Command canceled
4: Authentication required
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
See Also
Referenced By
gh(1), gh-alias-delete(1), gh-alias-import(1), gh-alias-list(1), gh-alias-set(1).
Nov 2025 GitHub CLI manual