Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
GitHub Docs

Using GitHub CLI extensions

Learn how to use custom extensions written by other GitHub CLI users.

About GitHub CLI extensions

Note

Extensions outside of GitHub and GitHub CLI are not certified by GitHub and are governed by separate terms of service, privacy policy, and support documentation. To mitigate risk when using third-party extensions, audit the source code of the extension before installing or updating the extension.

GitHub CLI extensions are custom GitHub CLI commands that anyone can create and use. For more information about how to create GitHub CLI extensions, seeCreating GitHub CLI extensions.

Extensions are locally installed and are scoped to the user. Therefore, if you access GitHub CLI from a different machine or another user accesses GitHub CLI from the same machine, the extension will not be available.

Finding extensions

You can find extensions by browsingrepositories with thegh-extension topic.

Installing extensions

To install an extension, use theextensions install subcommand. Replace therepo parameter with the repository of the extension. You can use the full URL, such ashttps://github.com/octocat/gh-whoami, or just the owner and repository, such asoctocat/gh-whoami.

If the owner and repository are used,gh will install the extension using the hostname to whichgh is currently authenticated. The full URL format is useful when installing extensions from a different host. For example, users on GitHub Enterprise Server should use the full repository URL to install extensions from GitHub.com or any other host.

To install an extension in development from the current directory, use. as the value for therepo parameter.

gh extension install REPO

If you already have an extension by the same name installed, the command will fail. For example, if you have installedoctocat/gh-whoami, you must uninstall it before installinghubot/gh-whoami.

Running an extension

When you have installed an extension, you run the extension as you would run a native GitHub CLI command, usinggh EXTENSION-NAME. TheEXTENSION-NAME is the name of the repository that contains the extension, minus thegh- prefix.

For example, if you installed the extension from theoctocat/gh-whoami repository, you would run the extension with the following command.

gh whoami

You can usually find specific information about how to use an extension in the README of the repository that contains the extension.

Viewing installed extensions

To view all installed extensions, use theextensions list subcommand. The output will also tell you which extensions have updates available.

gh extension list

Updating extensions

To update an extension, use theextensions upgrade subcommand. Replace theextension parameter with the name of the extension.

gh extension upgrade EXTENSION

To update all installed extensions, use the--all flag.

gh extension upgrade --all

Uninstalling extensions

To uninstall an extension, use theextensions remove subcommand. Replace theextension parameter with the name of the extension.

gh extension remove EXTENSION

[8]ページ先頭

©2009-2025 Movatter.jp