Mark Pitt
claude-skills
  1. claude-skills
  2. Developer environment
  3. mise
  4. references/backends.md

A file in mise

references/backends.md

Markdown 7.6 KB
backends.mdMarkdown, rendered

Mise Backends

Backends are the mechanisms mise uses to fetch and install tools. Choosing the right backend determines where a tool comes from, how it's installed, and how it's updated.

---

Backend Overview

BackendPrefixSourceBest For
Core(none)Built-in Rust implementationNode, Python, Go, Java, Ruby, Rust
GitHubgithub:GitHub Releases (binary download)Any tool with GitHub releases
UBIubi:GitHub Releases (binary download)GitHub releases (legacy; prefer github:)
Cargocargo:crates.ioRust CLI tools
npmnpm:npm registryNode.js CLI tools
Pipxpipx:PyPIPython CLI tools
Aquaaqua:Aqua registrySecurity-audited CLI tools
Condaconda:conda/mambaData science / scientific Python tools
Gemgem:RubyGemsRuby CLI tools
Gogo:Go module proxyGo CLI tools
HTTPhttp:Any direct download URLOne-off binary downloads
vfoxvfox:vfox plugin registryvfox-compatible plugins
Lua plugins(custom)Custom Lua scriptsCustom/private tools
asdf pluginsasdf:asdf plugin registryLegacy compatibility

---

Core Backends

Core backends are built directly into mise as Rust code. They are the fastest and most reliable option because they don't require external plugin scripts.

Supported Core Tools

Toolmise nameNotes
Node.jsnodeReads .nvmrc, supports lts, lts/iron aliases
PythonpythonReads .python-version
Gogo
JavajavaSupports Temurin, Corretto, Zulu distributions
Rubyruby
RustrustManages toolchains via rustup
.NETdotnet
Erlangerlang
Elixirelixir
Denodeno
Bunbun
[tools]
node = "22"
python = "3.12"
go = "1.23"
java = { version = "21", jdk_id = "temurin" }
dotnet = "8.0"

---

GitHub Backend (Preferred for GitHub Releases)

The github: backend downloads pre-compiled binaries directly from GitHub Releases. It is now the recommended approach for tools hosted on GitHub.

Syntax

[tools]
# Basic: owner/repo
"github:BurntSushi/ripgrep" = "latest"
"github:sharkdp/bat" = "latest"
"github:cli/cli" = "latest"        # GitHub CLI (gh)

Command line

mise use --global github:BurntSushi/ripgrep

When to use github:

  • The tool publishes GitHub release assets (.tar.gz, .zip, platform-specific binaries)
  • No Aqua registry entry exists for the tool
  • You want to pin to exact GitHub release tags

---

UBI (Universal Binary Installer)

UBI is an older backend that also downloads from GitHub Releases. Prefer github: for new tooling; use ubi: when you need its specific features such as explicit binary name overrides.

Syntax

[tools]
# With explicit binary name (when it differs from repo name)
"ubi:cli/cli[exe:gh]" = "latest"

Command line

mise use ubi:BurntSushi/ripgrep

---

Cargo Backend

Installs Rust CLI tools from crates.io using cargo install. Requires Rust/Cargo to be available.

[tools]
"cargo:ripgrep" = "latest"
"cargo:tokei" = "latest"
"cargo:cargo-watch" = "latest"
mise use cargo:cargo-watch

Note: Cargo installs compile from source, which is slower than binary backends. Prefer UBI or Aqua if a pre-compiled binary is available.

---

npm Backend

Installs Node.js packages as global CLI tools via npm.

[tools]
"npm:typescript" = "latest"
"npm:@angular/cli" = "latest"
"npm:azure-functions-core-tools" = "4"
"npm:prettier" = "3"
mise use npm:typescript

Best practice: For project-local tools, prefer committing them to package.json devDependencies. Use the npm backend for tools that need to be available globally across projects.

---

Pipx Backend

Installs Python applications in isolated virtualenvs via pipx. Requires Python to be available.

[tools]
"pipx:black" = "latest"
"pipx:ruff" = "latest"
"pipx:poetry" = "latest"
mise use pipx:black

---

Aqua Backend

Aqua is a registry-based CLI tool manager with security focus. It provides a curated list of tools with checksums and signature verification.

[tools]
"aqua:cli/cli" = "latest"             # GitHub CLI
"aqua:hashicorp/terraform" = "latest"
"aqua:helm/helm" = "latest"
"aqua:kubernetes/kubectl" = "latest"
mise use aqua:hashicorp/terraform

Advantages of Aqua over UBI:

  • Pre-verified checksums and signatures
  • Curated registry with consistent naming
  • Reproducible installs

Browse the registry: aquaproj/aqua-registry

---

Choosing the Right Backend

Decision guide for common scenarios:

ScenarioRecommended Backend
Language runtime (Node, Python, Go, .NET)Core
Rust CLI toolAqua if listed, otherwise Cargo
Security-critical tool (Terraform, kubectl)Aqua (verified checksums)
GitHub-released binary not in Aquagithub:
GitHub binary with non-standard binary nameubi: (supports [exe:name] override)
Node.js global CLI toolnpm
Python applicationPipx
Company-internal toolLua plugin
Legacy asdf plugin existsasdf (with migration plan to Lua)

---

Lua Plugin Architecture

When no built-in or community backend fits, write a custom Lua 5.1 plugin. Plugins are stored in ~/.local/share/mise/plugins/<name>/.

Plugin Directory Structure

~/.local/share/mise/plugins/my-tool/
└── mise.lua    # Main plugin file

Plugin Lifecycle Hooks

HookPurposeRequired
AvailableReturns list of installable versionsYes
PreInstallReturns download URL and SHA256 checksumYes
EnvKeysSets environment variables and PATH entriesYes
PostInstallRuns after download (chmod, compile, etc.)No
ParseLegacyFileParses legacy version files (.nvmrc, etc.)No

Example Plugin

-- mise.lua for a hypothetical "mytool"

local PLUGIN = {}

function PLUGIN:Available(ctx)
  -- Return a list of available version strings
  return { "1.0.0", "1.1.0", "2.0.0" }
end

function PLUGIN:PreInstall(ctx)
  local version = ctx.version
  local os = ctx.os       -- "linux", "macos", "windows"
  local arch = ctx.arch   -- "x64", "arm64"
  return {
    url = "https://example.com/mytool-" .. version .. "-" .. os .. "-" .. arch .. ".tar.gz",
    sha256 = "abc123..."  -- optional but recommended
  }
end

function PLUGIN:EnvKeys(ctx)
  return {
    { key = "MYTOOL_HOME", value = ctx.path },
    { key = "PATH", value = ctx.path .. "/bin" }
  }
end

function PLUGIN:PostInstall(ctx)
  -- Make binaries executable
  os.execute("chmod +x " .. ctx.path .. "/bin/mytool")
end

return PLUGIN

Installing a Custom Plugin

# From a local path
mise plugins install my-tool ~/.local/share/mise/plugins/my-tool

# From a git repo
mise plugins install my-tool https://github.com/you/mise-tool-plugin.git

---

asdf Plugin Compatibility

Mise can use existing asdf plugins as a compatibility layer:

[tools]
"asdf:hashicorp/terraform" = "latest"
# Or install asdf plugins directly
mise plugins install terraform https://github.com/asdf-community/asdf-hashicorp.git
mise use terraform@latest

Note: asdf plugins run as bash scripts via process spawning and are significantly slower than Lua plugins. Migrate to Lua or Core/UBI/Aqua backends when performance matters.