Run any GitHub release straight from the command line. gh-runx is a
GitHub CLI extension that fetches the release asset for
your current platform, caches it, and runs it β in one step.
$ gh runx ronelliott/muzak
# β downloads muzak-darwin-arm64.tar.gz, unpacks it, runs muzakNo manual "find the right asset, download, untar, chmod +x, run" dance. It works
with public and private repositories, because it authenticates with your
existing gh login.
- One command to download and run a release binary for the right OS/arch.
- Private repositories work out of the box β assets are fetched through the authenticated GitHub API.
- Smart asset matching by OS and architecture, with common naming aliases
(
darwin/macos,amd64/x86_64,arm64/aarch64, β¦). - Archive aware β transparently unpacks
.tar.gz,.tgz, and.zip, or runs a bare binary as-is. - Cached β a release is downloaded once and reused on later runs.
- Argument forwarding β everything after
--is passed straight to the program.
gh extension install ronelliott/gh-runxUpgrade later with gh extension upgrade runx.
gh runx <org/repo> [--version tag] [--exec path] [--force] [-- args...]
| Flag | Description |
|---|---|
--version <tag> |
Release tag to run. Defaults to the latest release. |
--exec <path> |
Relative path of the executable to run inside an archive. |
--force, -f |
Re-download and re-unpack even if a cached copy exists. |
-- <args...> |
Everything after -- is forwarded to the program. |
Flags may appear before or after the org/repo argument.
# Run the latest release
gh runx ronelliott/muzak
# Run a specific release
gh runx ronelliott/muzak --version v0.1.10
# Forward arguments to the program
gh runx ronelliott/muzak -- --help
# Pick a specific binary inside an archive that ships several
gh runx some/tool --exec bin/tool
# Force a fresh download, ignoring the cache
gh runx ronelliott/muzak --force- Resolve the release. Looks up the latest release (or
--version <tag>) fororg/repovia the GitHub API, authenticated with yourghtoken. - Match the asset. Selects the single release asset whose name matches the
current
GOOS/GOARCH, using common aliases. Checksums, signatures, and packages (.sha256,.sig,.deb,.rpm,.pkg,.msi, β¦) are ignored. - Download and cache. Fetches the asset through the GitHub asset API (so private releases work) into the cache directory, reusing it next time.
- Unpack. Extracts
.tar.gz/.tgz/.ziparchives; a bare binary is used directly. - Pick the executable. Prefers a file named after the repository, falls
back to the only executable present, or asks you to disambiguate with
--exec. - Run. Replaces the current process with the program (a child process on Windows), forwarding your arguments and environment.
Downloads are cached under your user config directory:
| OS | Location |
|---|---|
| macOS | ~/Library/Application Support/gh-runx/cache |
| Linux | $XDG_CONFIG_HOME/gh-runx/cache (or ~/.config/gh-runx/cache) |
| Windows | %AppData%\gh-runx\cache |
The layout is <owner>/<repo>/<tag>/, holding the downloaded asset and an
unpacked/ tree. Use --force to refresh a cached release, or delete a tag
directory to clear it.
gh-runx downloads and executes code from a release. Only run repositories
you trust.
- Assets are fetched over HTTPS through the authenticated GitHub API.
- When a release publishes a SHA-256 sums manifest (
SHA256SUMS,checksums.txt, and similar), the downloaded asset is verified against it and the run aborts on a mismatch. Verification happens on download; cached assets are trusted on reuse (use--forceto re-verify). - Releases without a sums manifest cannot be integrity-checked beyond transport security.
- GitHub CLI (
gh), authenticated (gh auth login). - Go 1.26+ β only to build from source.
git clone https://github.com/ronelliott/gh-runx
cd gh-runx
go build -o gh-runx .
gh extension install .MIT Β© Ron Elliott