gh-extension-install - Man Page

Install a gh extension from a repository

Synopsis

gh extension install <repository> [flags]

Description

Install a GitHub CLI extension from a GitHub or local repository.

For GitHub repositories, the repository argument can be specified in OWNER/REPO format or as a full repository URL. The URL format is useful when the repository is not hosted on github.com.

For remote repositories, the GitHub CLI first looks for the release artifacts assuming that it's a binary extension i.e. prebuilt binaries provided as part of the release. In the absence of a release, the repository itself is cloned assuming that it's a script extension i.e. prebuilt executable or script exists on its root.

The --pin flag may be used to specify a tag or commit for binary and script extensions respectively, the latest version is used otherwise.

For local repositories, often used while developing extensions, use . as the value of the repository argument. Note the following:

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 .

See Also

gh-extension(1)

Referenced By

gh-extension(1).

Aug 2025 GitHub CLI manual