GH-EXTENSION-INSTALL(1)

πŸ’… gh-extension-install(1) β€” the GitHub CLI manual, but make it make sense ✨

okay bestie, buckle up, because this is the page from the GitHub CLI manual that teaches you how to install a gh extension from a repository, and honestly? it's giving main character energy 🫢


🌸 NAME 🌸

gh-extension-install β€” install a gh extension from a repository, no cap πŸ’–


✨ SYNOPSIS ✨

gh extension install <repository> [flags]

πŸ¦‹ DESCRIPTION πŸ¦‹

So, gh extension install installs a GitHub CLI extension from a GitHub or local repository. iconic behaviour fr fr πŸ‘‘

For GitHub repositories, the <repository> argument can be specified in OWNER/REPO format, or as a full repository URL. That URL format is lowkey the move when the repository is not hosted on github.com β€” iykyk πŸ’…

For remote repositories, the GitHub CLI first looks for the release artifacts, assuming it's a binary extension β€” i.e. prebuilt binaries provided as part of the release. If there's no release? Then the repository itself gets cloned, assuming it's a script extension β€” i.e. a prebuilt executable or script exists on its root. two paths, one slay ✨

The --pin flag may be used to specify a tag or commit for binary and script extensions respectively β€” and the latest version is used otherwise. periodt πŸŽ€

For local repositories β€” often used while developing extensions β€” use . as the value of the <repository> argument. And here's the important bits, so pay attention bestie:

  • After installing an extension from a locally cloned repository, the GitHub CLI will manage this extension as a symbolic link (or equivalent mechanism on Windows) pointing to an executable file with the same name as the repository in the repository's root. For example, if the repository is named gh-foobar, the symbolic link will point to gh-foobar in the extension repository's root.
  • When executing the extension, the GitHub CLI will run the executable file found by following the symbolic link. If no executable file is found, the extension will fail to execute. πŸ’€
  • If the extension is precompiled, the executable file must be built manually and placed in the repository's root.

For the list of available extensions, see https://github.com/topics/gh-extension 🌈


πŸ’– OPTIONS πŸ’–

  • --force β€” force upgrade extension, or ignore if latest already installed πŸ”₯
  • --pin <string> β€” pin extension to a release tag or commit ref πŸ“Œ

🌟 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. 🫢

πŸ“ EXAMPLE πŸ“

# Install an extension from a remote repository hosted on GitHub
$ gh extension install owner/gh-extension

# Install an extension from a remote repository via full URL
$ gh extension install https://my.ghes.com/owner/gh-extension

# Install an extension from a local repository in the current working directory
$ gh extension install .

ate. no notes. πŸ‘‘


🧚 SEE ALSO 🧚

gh-extension(1) β€” go read that one too, bestie πŸŽ€


that's a wrap! stay slay, stay patched, and remember: this page is from GitHub CLI v2.102.0, dated Oct 2026 πŸ’œ πŸ¦‹ bye bestieeee πŸ’–

πŸ“¦ where this page comes from