gh extension install
Add new gh commands from the community
gh extension install adds community-built commands to gh, so tools like gh dash or gh copilot become first-class gh subcommands. Install from any repository that follows the gh-extension convention, pin a version, and upgrade or remove them later.
gh extension install dlvhdr/gh-dashSyntax
gh extension install <repository> [flags]Examples
Install an extension from a repo
gh extension install dlvhdr/gh-dashPin to a specific release
gh extension install owner/gh-tool --pin v1.2.0List installed extensions
gh extension listUpgrade every extension
gh extension upgrade --allRemove an extension
gh extension remove dashOptions & flags
| Flag | What it does |
|---|---|
| --pin | Pin the extension to a specific release tag or commit. |
| --force | Force installation even if the extension seems already installed. |
How to use gh extension install, step by step
- Find an extension repo named
gh-something. - Run
gh extension install owner/gh-something. - Invoke it as a subcommand, e.g.
gh dash. - Keep them current with
gh extension upgrade --all.
Common errors and fixes
there is already an installed extension that provides the "dash" command
You already have an extension using that name. Remove the old one with gh extension remove dash, or use --force.
failed to install: repository does not contain a gh- prefixed executable
That repo isn't a valid gh extension. Confirm the name follows the gh- convention and includes an executable.
Related commands
Frequently asked questions
How do I install a GitHub CLI extension?
Run gh extension install owner/repo, for example gh extension install dlvhdr/gh-dash. The extension then works as a gh subcommand like gh dash.
How do I update GitHub CLI extensions?
Run gh extension upgrade --all to update every installed extension, or name one to upgrade it individually.
How do I remove an extension?
Use gh extension remove <name>. List what's installed first with gh extension list.