GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
GH-EXTENSION-INSTALL(1) GitHub CLI manual GH-EXTENSION-INSTALL(1)

gh-extension-install - Install a gh extension from a repository

gh extension install <repository> [flags]

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 .

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:

  • 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⟩.

Force upgrade extension, or ignore if latest already installed

Pin extension to a release tag or commit ref

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.

# 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 .

gh-extension(1)

Jul 2025

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.