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 πŸ¦‹


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