Install an extension from a local folder #12557
-
|
How can I install an GH CLI extension executable, which I downloaded from a repository, from a local folder? The GH CLI docs states
I have tried to
What are the requirements (folder/file names) to install an extension from a local folder? Can anyone help? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Requirements for local install Folder name – must be gh- (e.g. gh-myext). Run from inside the folder: cd gh-myext then gh extension install . Windows and gh-myext.exe On Windows, gh looks for a file named gh-myext (no .exe), but you have gh-myext.exe. Use a symlink: cd gh-myext Then run: gh extension install . Alternative: install from GitHub If the extension is on GitHub, install it directly: gh extension install owner/gh-myext |
Beta Was this translation helpful? Give feedback.
Requirements for local install
Folder name – must be gh- (e.g. gh-myext).
Executable name – must match the folder name.
Run from inside the folder: cd gh-myext then gh extension install .
Windows and gh-myext.exe
On Windows, gh looks for a file named gh-myext (no .exe), but you have gh-myext.exe. Use a symlink:
cd gh-myext
mklink gh-myext gh-myext.exe
(Needs Administrator or Developer Mode.)
Then run:
gh extension install .
Note: Older gh versions (before v2.3.0) had issues with .exe on Windows. Make sure you're on a recent version: gh --version.
Alternative: install from GitHub
If the extension is on GitHub, install it directly:
gh extension install owner/gh-myext
gh will download the co…