You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 28, 2026. It is now read-only.
There is desire to override the default behavior of a command with an alias. This enables the use of the CLI in a way where the behavior is consistent and reduces the number of options.
Use Case
I am developing a script which will be applied to various machines to process logs. I want to ensure that every time the encrypt process is used a default attribute is applied.
This could be done via scripting, but since new developers might not know about that script I'd prefer to pre-configure the CLI to always add this command.
Example
The GitHub CLIgh supports this via the alias subcommand.
Aliases can be used to make shortcuts for gh commands or to compose multiple commands.
Run `gh helpalias set` to learn more.
USAGE
gh alias<command> [flags]
AVAILABLE COMMANDS
delete: Delete set aliases
import: Import aliases from a YAML file
list: List your aliases
set: Create a shortcut for a gh command
INHERITED FLAGS
--help Show helpforcommand
LEARN MORE
Use `gh <command><subcommand> --help`for more information about a command.
Read the manual at https://cli.github.com/manual
Learn about exit codes using `gh help exit-codes`
There is desire to override the default behavior of a command with an alias. This enables the use of the CLI in a way where the behavior is consistent and reduces the number of options.
Use Case
I am developing a script which will be applied to various machines to process logs. I want to ensure that every time the encrypt process is used a default attribute is applied.
This could be done via scripting, but since new developers might not know about that script I'd prefer to pre-configure the CLI to always add this command.
Example
The GitHub CLI
ghsupports this via thealiassubcommand.