gh-exts is a GitHub CLI extension for managing gh extensions with a manifest.
Use gh exts instead of gh extension, gh extensions, or gh ext when you want your installed extensions to stay reproducible.
Install:
gh extension install terfno/gh-extsusage:
gh exts -hManage GitHub CLI extensions with manifest sync.
USAGE
gh exts <command> [flags]
AVAILABLE COMMANDS
install: Install an extension or reinstall from manifest
remove: Remove an extension or remove stray extensions
list: List installed extensions and sync manifest if needed
LEARN MORE
Other subcommands are delegated to `gh extension`.
Use `gh exts` instead of `gh extension`, `gh extensions`, or `gh ext`
to keep the manifest in sync.
- Wraps
gh extension - Keeps a manifest of installed extensions
- Supports pinned entries as
owner/repo:pin - Can rebuild local extension state from the manifest
vs afx
gh-exts is a simpler fit if you just want to manage gh extensions.
- Add with
gh exts install <repo> - Remove with
gh exts remove <name> - Stay close to the usual
gh extensionworkflow, with manifest sync built in
If you want a broader tool manager, afx may fit better. If you want add/remove flows that feel native to gh, use gh-exts.
The manifest file is stored at:
~/.config/gh/extensions.txt
This also works if ~/.config/gh/extensions.txt is a symbolic link managed from your dotfiles, as long as the link target is writable.
The manifest is a plain text file with one extension per line.
# for terfno/gh-exts
# latest tracking
dlvhdr/gh-dash
# pinned
terfno/gh-wt:69ee2692229d9481b41e3d2a492c9df2af00c593
Rules:
- Empty lines are ignored
- Lines starting with
#are ignored owner/repomeans latest trackingowner/repo:pinmeans pinned
gh exts install <repo> [flags]
gh exts install
gh exts remove <name> [flags]
gh exts remove
gh exts list [flags]
Other subcommands are delegated to gh extension.
Common flags:
-y,--yes,--non-interactive: Skipgh-extsconfirmation prompts
- Runs
gh extension install - Previews the manifest update
- Updates the manifest after confirmation
- With
-y/--yes, auto-confirms the manifest update for non-interactive runs
- Treats the manifest as the source of truth
- Shows the extensions that will be reinstalled
- Reinstalls manifest entries after confirmation
- With
-y/--yes, auto-confirms the reinstall prompt for non-interactive runs
- Runs
gh extension remove - Previews the manifest update
- Updates the manifest after confirmation
- Removes installed extensions that are not in the manifest
- Reinstalls the manifest entries
- Asks for confirmation before running
- With
-y/--yes, auto-confirms the rebuild prompt for non-interactive runs
- Runs
gh extension list - Detects manifest drift
- Shows a simple diff preview before manifest changes
- Updates the manifest only after confirmation
- With
-y/--yes, auto-confirms manifest sync
- Pin detection currently relies on
.pin-*marker files in the installed extension directory - Manifest updates preserve existing comments and blank lines where possible
Useful local checks:
sh -n gh-exts lib/common.sh lib/manifest.sh lib/state.sh lib/commands.shTo inspect the current help output:
./gh-extsThis project is licensed under the MIT License. See LICENSE for details.