GH-ALIAS-IMPORT(1)
π gh-alias-import(1) β the GitHub CLI manual, but make it cute
okay so bestie, you know how you've got a whole little zoo of aliases on your laptop and then you sit down at literally any other machine and it's giving nothing? yeah. this is the glow-up for that. it's gh-alias-import, from the GitHub CLI manual, and it's here to move your alias collection around like it's a playlist. π
β¨ NAME β¨
gh-alias-import β import aliases from a YAML file. that's the whole vibe. your aliases, but from a file, slay.
πΈ SYNOPSIS πΈ
gh alias import [<filename> | -] [flags]
that's it. a file, or a -, plus flags. so clean, so iconic. π¦
π DESCRIPTION π
so what it does: it imports aliases from the contents of a YAML file. yes, YAML. the little indentation gremlin language. but it's fine, it's fine, you've got this. π«Ά
here's the tea on how your aliases should be defined β as a map in YAML, where the keys are the aliases and the values are the corresponding expansions. an example file should look like the following, and honestly? look at it. gorgeous. β¨
bugs: issue list --label=bug
igrep: '!gh issue list --label="$1" | grep "$2"'
features: |-
issue list
--label=enhancement
and if you're the kind of girl who pipes things (you are, we both know you are), use - to read aliases (in YAML format) from standard input. no file needed, just vibes and a pipe. π
also? the output from gh alias list can be used to produce a YAML file containing your aliases, which you can use to import them from one machine to another. literally your aliases, packing a little suitcase, going on tour. π§³ run gh help alias list to learn more.
β OPTIONS β
--clobberβ overwrite existing aliases of the same name. no cap, it will absolutely just replace what's already there, so maybe look before you clobber, bestie. π
π₯ EXIT CODES π₯
like a vibe check, but for whether it worked:
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. (iykyk, always read the help fr fr)
π EXAMPLE π
so here's what it looks like in the wild, okay, study these:
# Import aliases from a file
$ gh alias import aliases.yml
# Import aliases from standard input
$ gh alias import -
the way that second one just eats from stdin. main character energy. π
π¦ SEE ALSO π¦
gh-alias(1)β the whole alias family, go say hi
and that's the page, bestie!! π it's GitHub CLI v2.102.0, dated Oct 2026, and that's the whole sign-off from me β go forth and import your aliases, periodt. πΈβ¨π
π¦ where this page comes from
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms