docs/dev-tools/backends/github.md
You may install GitHub release assets directly using the github backend. This backend downloads release assets from GitHub repositories and is ideal for tools that distribute pre-built binaries through GitHub releases.
The code for this is inside of the mise repository at ./src/backend/github.rs.
The following installs the latest version of ripgrep from GitHub releases and sets it as the active version on PATH:
$ mise use -g github:BurntSushi/ripgrep
$ rg --version
ripgrep 14.1.1
The version will be set in ~/.config/mise/config.toml with the following format:
[tools]
"github:BurntSushi/ripgrep" = "latest"
The following tool-options are available for the github backend—these
go in [tools] in mise.toml.
When no asset_pattern is specified, mise automatically selects the best asset for your platform. The system scores assets based on:
For most tools, you can simply install without specifying patterns:
mise install github:user/repo
::: tip
The autodetection logic is implemented in src/backend/asset_matcher.rs, which is shared by both the GitHub and GitLab backends.
:::
asset_patternSpecifies the pattern to match against release asset names. This is useful when there are multiple assets for your OS/arch combination or when you need to override autodetection.
[tools]
"github:cli/cli" = { version = "latest", asset_pattern = "gh_*_linux_x64.tar.gz" }
version_prefixSpecifies a custom version prefix for release tags. By default, mise handles the common v prefix (e.g., v1.0.0), but some repositories use different prefixes like release-, version-, or no prefix at all.
When version_prefix is configured, mise will:
[tools]
"github:user/repo" = { version = "latest", version_prefix = "release-" }
Examples:
version_prefix = "release-":
1.0.0 → mise searches for release-1.0.0 tag1.0.0 (prefix stripped)version_prefix = "" (empty string):
1.0.0 → mise searches for 1.0.0 tag (no prefix)For different asset patterns per platform:
[tools."github:cli/cli"]
version = "latest"
[tools."github:cli/cli".platforms]
linux-x64 = { asset_pattern = "gh_*_linux_x64.tar.gz" }
macos-arm64 = { asset_pattern = "gh_*_macOS_arm64.tar.gz" }
The GitHub backend installs one release asset for each tool. If a repository publishes
multiple binaries as separate assets in the same release, define one tool alias per
binary and point each alias at the same github:owner/repo backend. Then configure
each aliased tool with its own asset_pattern.
[tool_alias]
tool-a = "github:owner/repo"
tool-b = "github:owner/repo"
[tools.tool-a]
version = "latest"
asset_pattern = "tool-a-*"
[tools.tool-b]
version = "latest"
asset_pattern = "tool-b-*"
checksumVerify the downloaded file with a checksum:
[tools."github:owner/repo"]
version = "1.0.0"
asset_pattern = "tool-1.0.0-x64.tar.gz"
checksum = "sha256:a1b2c3d4e5f6789..."
Instead of specifying the checksum here, you can use mise.lock to manage checksums.
[tools."github:cli/cli"]
version = "latest"
[tools."github:cli/cli".platforms]
linux-x64 = {
asset_pattern = "gh_*_linux_x64.tar.gz",
checksum = "sha256:a1b2c3d4e5f6789...",
}
macos-arm64 = {
asset_pattern = "gh_*_macOS_arm64.tar.gz",
checksum = "sha256:b2c3d4e5f6789...",
}
sizeVerify the downloaded asset size:
[tools]
"github:cli/cli" = { version = "latest", size = "12345678" }
strip_componentsNumber of directory components to strip when extracting archives:
[tools]
"github:cli/cli" = { version = "latest", strip_components = 1 }
::: info
If strip_components is not explicitly set, mise will automatically detect when to apply strip_components = 1. This happens when the extracted archive contains exactly one directory at the root level and no files. This is common with tools like ripgrep that package their binaries in a versioned directory (e.g., ripgrep-14.1.0-x86_64-unknown-linux-musl/rg). The auto-detection ensures the binary is placed directly in the install path where mise expects it.
:::
binRename the downloaded binary to a specific name. This is useful when downloading single binaries that have platform-specific names:
[tools."github:docker/compose"]
version = "2.29.1"
bin = "docker-compose" # Rename the downloaded binary to docker-compose
::: info
When downloading single binaries (not archives), mise automatically removes OS/arch suffixes from the filename. For example, docker-compose-linux-x86_64 becomes docker-compose automatically. Use the bin option only when you need a specific custom name.
:::
rename_exeRename the executable after extraction from an archive. This is useful when the archive contains a binary with a platform-specific name that you want to rename:
[tools."github:yt-dlp/yt-dlp"]
version = "latest"
asset_pattern = "yt-dlp_linux.zip"
rename_exe = "yt-dlp" # Rename the extracted binary to yt-dlp
::: tip
Use rename_exe for archives where the binary inside has a different name than desired. Use bin for single binary downloads (non-archives).
:::
no_appSkip macOS .app bundle assets during autodetection and prefer standalone CLI binaries instead. This is useful when a repository provides both a macOS .app bundle (often an Xcode extension or GUI application) and a standalone command-line tool:
[tools."github:nicklockwood/SwiftFormat"]
version = "latest"
rename_exe = "swiftformat"
no_app = true # Skip SwiftFormat.for.Xcode.app.zip, use swiftformat.zip instead
When no_app = true:
.app. (e.g., Tool.app.zip, Tool.for.Xcode.app.zip) are penalized during autodetectiontool.zip, tool-macos.tar.gz) are preferred.app. assets are already penalized by platform matchingasset_pattern values are used as-is::: info Without this option, mise's autodetection might select .app bundles on macOS, which can be problematic if the bundle contains a GUI application or Xcode extension rather than a standalone CLI tool. :::
bin_path::: v-pre
Specify the directory containing binaries within the extracted archive, or where to place the downloaded file. This supports Tera templating with variables like {{ version }}, {{ os }}, {{ arch }}, and arch aliases ({{ darwin_os }}, {{ amd64_arch }}, {{ x86_64_arch }}, {{ gnu_arch }}):
:::
[tools."github:cli/cli"]
version = "latest"
bin_path = "cli-{{ version }}/bin" # expands to cli-1.0.0/bin
Binary path lookup order:
bin_path is specified, use that directorybin_path is not set, look for a bin/ directory in the install pathbin/ directory exists, search subdirectories for bin/ directoriesbin/ directories are found, searches immediate subdirectories for any executable files. If an executable is found directly within a subdirectory, that entire subdirectory is considered a binary path.filter_binsComma-separated list of binaries to symlink into a filtered .mise-bins directory. This is useful when the tool comes with extra binaries that you do not want to expose on PATH.
[tools]
"github:jgm/pandoc" = { version = "latest", filter_bins = "pandoc" }
When enabled:
.mise-bins subdirectory is created with symlinks only to the specified binariespandoc-lua or pandoc-server) are not exposed on PATHapi_urlFor GitHub Enterprise or self-hosted GitHub instances, specify the API URL. mise uses this URL for release listing and release asset lookup, and may also use it to download assets when browser download URLs are not reachable or when using custom/private instances:
[tools]
"github:myorg/mytool" = { version = "latest", api_url = "https://github.mycompany.com/api/v3" }
prereleaseBy default, releases flagged prerelease: true on GitHub are excluded from mise ls-remote and from latest resolution. Set prerelease = true to include them:
[tools]
"github:myorg/mytool" = { version = "latest", prerelease = true }
When set:
v1.0.0-rc1, v0.1.2-dev.86) appear in mise ls-remote.latest resolves to the newest version across stable and pre-releases, rather than taking the GitHub /releases/latest shortcut (which returns whichever release the repo owner has marked as "Latest" — usually the newest non-prerelease, but it can be any release they've pinned via the API).1.2) match pre-release tags under that prefix.Useful for repositories whose active releases are all pre-releases (e.g. internal tools shipping continuous dev builds), or when you need to track a project's release candidates. Draft releases are always excluded. Has no effect on GitLab.
If you are using a self-hosted GitHub instance, set the api_url tool option. For authentication, see GitHub Tokens.
github:cli/cligithub:cli/[email protected]