Skip to content

registry: add github: fallback backends for locally-verified tools#10145

Open
matracey wants to merge 34 commits into
jdx:mainfrom
matracey:registry-github-fallbacks
Open

registry: add github: fallback backends for locally-verified tools#10145
matracey wants to merge 34 commits into
jdx:mainfrom
matracey:registry-github-fallbacks

Conversation

@matracey
Copy link
Copy Markdown
Contributor

@matracey matracey commented May 30, 2026

Follow-up to #10000. I didn't get a chance to address the bot review comments there before the branch became stale.

Summary

Add github: fallback backend entries to 34 registry files for tools that are already in the registry. Each new entry is inserted immediately after the existing aqua: entry, providing a Tier 1 GitHub releases fallback for users who have aqua disabled (e.g. via MISE_DISABLE_BACKENDS=aqua) or unavailable, before falling through to lower-tier backends (asdf:, vfox:, cargo:, etc.).

Per the AGENTS.md backend-tier guidance, aqua: is the preferred Tier 1 backend and github: is the recommended fallback. Many existing registry entries currently fall through from aqua: directly to asdf: plugins (which AGENTS.md discourages for new entries on supply-chain grounds) or to runtime-backed backends (cargo:, go:, pipx:). This PR fills the gap.

For tools where the github: backend downloads binaries with platform-specific or versioned filenames (shfmt, pre-commit), the entries use the [[backends]] table form to set bin to ensure the binary is callable by its expected short name.

Popularity

No popularity-check section is needed because this PR does not add any new tools to the registry. It only adds a github: backend for tools that are already accepted registry entries.

Verification

All github:owner/repo@latest installs were verified on Windows 11 x86_64 via:

$env:MISE_DATA_DIR = "<temp-dir>"
mise install "github:<owner>/<repo>@latest"
# Then: mise exec "github:<owner>/<repo>@latest" -- <tool> --version

Each install was verified for both successful installation (exit 0) AND binary callability by the tool's expected short name. Tools where the binary was not callable were either fixed with bin or removed from the PR.

Caveat: Verification was performed on a single host platform (Windows x86_64). Cross-platform asset availability was not exhaustively checked.

Candidate set and results

Modified — inline backends array (32 tools, github: inserted after aqua:)

Installed tool Registry file github: backend added
act act.toml github:nektos/act
actionlint actionlint.toml github:rhysd/actionlint
age age.toml github:FiloSottile/age
bat bat.toml github:sharkdp/bat
cargo-binstall cargo-binstall.toml github:cargo-bins/cargo-binstall
cargo-insta cargo-insta.toml github:mitsuhiko/insta
cmake cmake.toml github:Kitware/CMake
cmdx cmdx.toml github:suzuki-shunsuke/cmdx
coreutils coreutils.toml github:uutils/coreutils
delta delta.toml github:dandavison/delta
fd fd.toml github:sharkdp/fd
fzf fzf.toml github:junegunn/fzf
git-cliff git-cliff.toml github:orhun/git-cliff
github-cli / gh github-cli.toml github:cli/cli
hk hk.toml github:jdx/hk
htmlq htmlq.toml github:mgdm/htmlq
jq jq.toml github:jqlang/jq
lua-language-server lua-language-server.toml github:LuaLS/lua-language-server
ninja ninja.toml github:ninja-build/ninja
pkl pkl.toml github:apple/pkl
pnpm pnpm.toml github:pnpm/pnpm
rclone rclone.toml github:rclone/rclone
ripgrep / rg ripgrep.toml github:BurntSushi/ripgrep
rust-analyzer rust-analyzer.toml github:rust-lang/rust-analyzer
shellcheck shellcheck.toml github:koalaman/shellcheck
sops sops.toml github:getsops/sops
stylua stylua.toml github:JohnnyMorganz/StyLua
taplo taplo.toml github:tamasfe/taplo
usage usage.toml github:jdx/usage
uv uv.toml github:astral-sh/uv
yamlfmt yamlfmt.toml github:google/yamlfmt
yq yq.toml github:mikefarah/yq

Modified — converted to [[backends]] table form to set bin (2 tools)

These tools ship binaries with platform-specific or versioned filenames that the github: backend doesn't automatically rename. The bin option ensures the binary is callable by its expected short name.

Installed tool Registry file github: backend bin
shfmt shfmt.toml github:mvdan/sh "shfmt"
pre-commit pre-commit.toml github:pre-commit/pre-commit "pre-commit"

matracey added 30 commits May 19, 2026 14:37
Convert to [[backends]] table form so rename_exe can be attached to the github: entry, renaming the version-suffixed release binary to its expected short name.
Convert to [[backends]] table form so rename_exe can be attached to the github: entry, renaming the version-suffixed release binary to its expected short name.
matracey added 4 commits May 19, 2026 14:37
Convert to [[backends]] table form so rename_exe can be attached to the github: entry, renaming the platform-suffixed release binary to its expected short name.
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds github backends to various tool registries and updates the corresponding end-to-end tests to reflect these additions. The review feedback suggests using inline tables for simple backend options in pre-commit.toml and shfmt.toml to improve readability and prevent potential TOML scoping issues.

Comment thread registry/pre-commit.toml
Comment thread registry/shfmt.toml
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 30, 2026

Greptile Summary

Adds github: Tier 1 fallback backend entries to 34 existing registry tool files, filling the gap between aqua: (preferred) and lower-tier backends (asdf:, cargo:, pipx:, etc.) for users with aqua disabled. Two tools (shfmt, pre-commit) required conversion to the [[backends]] table form to attach a bin option that renames the downloaded binary to its expected short name.

  • 32 tools receive a simple inline github:owner/repo entry inserted after the existing aqua: entry; the TOML pattern and backend ordering follow established project conventions.
  • 2 tools (shfmt.toml, pre-commit.toml) are converted to [[backends]] table form with [backends.options] bin = \"<name>\" — the scoping rules (options apply to the most recently opened [[backends]] element) match the precedent set by buck2.toml and yt-dlp.toml.
  • e2e tests in test_disable_backends and test_registry are updated to reflect the new backend chain, including disabling both aqua and github to reach the asdf: fallback path.

Confidence Score: 4/5

Safe to merge — all additions are purely additive fallback entries; a failing github: backend would transparently fall through to the next backend in the chain

All 34 additions follow the established [[backends]] / inline pattern already used by other registry files. The bin option usage in shfmt.toml and pre-commit.toml is correct and matches the buck2.toml precedent. e2e tests are updated consistently. The one caveat is that cross-platform verification was performed only on Windows x86_64 — tools with complex release structures (cmake, lua-language-server, ninja) may behave differently on Linux/macOS, though the fallback chain means any failure is non-breaking.

No files require special attention; tools with non-trivial release structures (cmake.toml, lua-language-server.toml, rust-analyzer.toml) are worth a quick cross-platform smoke-test if possible, but failures are non-breaking due to the fallback chain

Important Files Changed

Filename Overview
e2e/backend/test_disable_backends Updated to expect github: in registry output for age and to disable both aqua and github when testing asdf fallback path — correctly reflects new backend chain
e2e/cli/test_registry Updated expected output for gh registry lookup to include github:cli/cli between aqua and asdf entries — correct and consistent
registry/shfmt.toml Converted from inline array to [[backends]] table form to attach bin = shfmt to the github: entry only; TOML scoping is correct per spec and matches the buck2.toml precedent
registry/pre-commit.toml Converted to [[backends]] table form to set bin = pre-commit on the github: entry; same TOML pattern as shfmt.toml — options scoping is correct
registry/github-cli.toml Adds github:cli/cli as Tier 1 fallback between aqua and asdf entries; matches e2e test update
registry/cmake.toml Adds github:Kitware/CMake fallback; CMake releases include versioned tarballs with a nested bin/cmake path — the github backend's discover_bin_paths should detect the bin/ subdir automatically, but only verified on Windows
registry/rust-analyzer.toml Adds github:rust-lang/rust-analyzer; releases ship single binaries named rust-analyzer- which the auto-clean logic strips to rust-analyzer using the tool name — no bin option required
registry/pnpm.toml Adds github:pnpm/pnpm; pnpm releases platform-specific executables (pnpm-linux-x64, pnpm-win-x64.exe) that the auto-clean logic should strip to pnpm; verified on Windows and npm: fallback remains
registry/cargo-insta.toml Adds github:mitsuhiko/insta fallback; if the repo doesn't publish prebuilt binaries for cargo-insta on a given platform the github backend will fail through to cargo:insta, which is acceptable
registry/lua-language-server.toml Adds github:LuaLS/lua-language-server; releases include a directory structure with bin/lua-language-server — the github backend should pick up the nested bin/ directory automatically

Reviews (1): Last reviewed commit: "registry: add github backend for yq" | Re-trigger Greptile

Comment thread registry/shfmt.toml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant