iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
⚙️

How to Declaratively Manage All CLI Tools Centrally with mise

に公開

Introduction

Recently, I have been hearing more and more about mise.
In this article, I will introduce how to use mise to centrally manage CLI tools.

What is mise?

mise provides various features starting with language runtime version management, such as the following:

  • Language runtime installation and version management (equivalent to asdf)
  • CLI tool installation and version management functionality (equivalent to aqua)
  • Task runner functionality (equivalent to make)
  • Environment switching based on directories (equivalent to direnv)

A key feature of mise is that it provides these functionalities comprehensively in a single tool.

While many people may know mise for specific features like language runtime version management, it might not be widely known that it is actually a multifunctional, all-in-one tool.

Therefore, this article focuses on mise's capabilities as a CLI management tool, including how to manage tools with it and some helpful tips.

Features of mise

Declarative Version Management for Tools via TOML

Similar to aqua, mise allows you to manage CLI tools declaratively.

You specify the tools and their versions in a TOML file.

# mise.toml
[tools]
jq      = "latest"
node    = "22.19.0"
python  = "3.14.0"
tmux    = "3.5"

Supports a Wide Range of Backends

mise can install and manage tools from a variety of package managers. In mise, these are referred to as "backends".

As of December 2025, the supported backends are:

  • asdf
  • aqua
  • cargo
  • gem
  • github
  • gitlab
  • go
  • http
  • npm
  • pipx
  • ubi
  • vfox

As you can see, major package managers are supported, and you can install tools from these package managers through mise.

How to Use

The basic usage for managing CLIs is almost the same as when mise is used for managing language runtimes.

When you install a tool, it is recorded in the configuration file along with its version. The path to the configuration file changes depending on whether the global -g option is used. (I will primarily explain global management examples from here on.)

  • If the -g option is not used, it defaults to the local ./mise.toml.
  • If the -g option is used, it defaults to ~/.config/mise/config.toml.

Commands

  • Install a tool
mise install -g <tool>@<version>
  • Install and activate a tool
mise use -g <tool>
  • Interactively select and install a tool
    If you want to see which tools can be installed, you can run mise use without specifying a <tool>.
mise use -g

Specifying Backends

For registered tools, you can install them without explicitly specifying which backend to use. In that case, the backend is automatically selected according to priority.

# Can be installed without specifying a backend
# For actionlint, aqua:rhysd/actionlint is selected internally
mise use -g actionlint

You can check the list of registered tools and their corresponding backends in mise using the following command:

  • List of registered tools and backends
~ % mise registry

Tool                          Backends
1password                     vfox:mise-plugins/vfox-1password aqua:1password/cli
1password-cli                 vfox:mise-plugins/vfox-1password aqua:1password/cli
aapt2                         vfox:mise-plugins/vfox-aapt2
act                           aqua:nektos/act ubi:nektos/act asdf:gr1m0h/asdf-act
action-validator              aqua:mpalmer/action-validator ubi:mpalmer/action-validator asdf:mpalmer/action-validator cargo:action-validator
actionlint                    aqua:rhysd/actionlint ubi:rhysd/actionlint asdf:crazy-matt/asdf-actionlint go:github.com/rhysd/actionlint/cmd/actionlint
...
  • Check detailed tool information
mise tool <tool>

# Example
~ % mise tool fzf
Backend:            aqua:junegunn/fzf
Description:        :cherry_blossom: A command-line fuzzy finder
Installed Versions: 0.64.0
Tool Options:       [none]
Security:           checksum (sha256)

However, unlike the language runtime systems built into the mise core, not every CLI tool you want to install may be registered in mise. For tools not built into mise, you can explicitly specify a backend to install tools that are not in the registry.

  • For example, the renovate CLI is distributed as an npm package but is not currently included in mise's registered tools. Therefore, it cannot be installed without specifying a backend, but you can install it by specifying the npm backend as follows:
# Fails without a backend because it is not registered as a tool
mise use -g renovate
# Explicitly specify the backend (npm)
# Backends are specified in the format <backend>:<package_name>
mise use -g npm:renovate

In this way, you can install tools not registered in mise by specifying the backend.

Configuration File

When managing globally, the location of the mise configuration file follows $XDG_CONFIG_HOME. Therefore, you should definitely define your configuration at $XDG_CONFIG_HOME/mise/config.toml.
You can install all tools at once by creating the configuration file and running mise install -g.

Tips for Managing CLIs Centrally with mise

Here are some tips for managing CLI tools with mise.

Setting GITHUB_TOKEN

  • mise uses the GitHub API frequently when managing or installing tools. Therefore, as the number of tools you manage with mise increases, you will often encounter GitHub API rate-limiting warnings if you are not authenticated. For this reason, if you are managing a significant number of tools, make sure to set the GITHUB_TOKEN when installing.

  • Additionally, by default, mise installs multiple tools in parallel (8 jobs). In my experience, even when providing a GITHUB_TOKEN, attempting to install dozens of tools simultaneously can still hit rate limits. If you don't need the fastest possible installation time, reducing the number of parallel jobs is a good strategy.

GITHUB_TOKEN=$(gh auth token) mise install --jobs=2

Backend Selection

mise supports multiple backends, and since some tools can be installed via multiple backends, you may wonder which one to choose. Here is my current order of priority for backend selection.

Priority of Backend Selection

  1. aqua: Choose aqua if the tool is registered in aqua.
  2. ubi/github: If not in aqua, choose this if binary distributions are available via GitHub Releases.
  3. npm/cargo/pip etc: Choose this if no binary distribution is available but installation via a package manager is possible.
  4. http: Choose this if none of the above apply and the tool is distributed outside of standard package managers.

aqua

First, I believe it is best to use the aqua backend for tools registered in aqua.

The reasons are as follows:

  • Depending on how the tool is distributed, aqua handles aspects such as filtering release tags or adjusting for differences between repository names and executable names, which simplifies your mise configuration.
    • For example, with bitwarden/clients, GitHub release tags contain versions for web and desktop clients in addition to the CLI, so filtering release tags is necessary to install the CLI.
    • For example, with neovim/neovim, the repository name (neovim) differs from the executable name (nvim), requiring adjustments to set the PATH.
  • aqua emphasizes security, verifying checksums and signatures to ensure safe tool installation.
  • Even for tools not supported by aqua, contributing to aqua-registry benefits both aqua and mise users.

As a user, the top two points are significant benefits.

While aqua and mise are often compared as declarative CLI management tools, and you might think mise is superior because it is multifunctional, it is worth emphasizing that mise internally relies heavily on aqua for CLI management and benefits from aqua-registry. (Thank you, aqua! 🙏)

ubi/github/gitlab

If aqua is not supported but binary distributions exist in GitHub Releases, etc., you can easily download binaries directly using the ubi, github, or gitlab backends.

ubi stands for Universal Binary Installer, a tool that automatically selects and installs binaries from GitHub Releases based on the host OS/architecture.

The ubi backend allows you to download and install binaries directly from GitHub Releases via ubi.

Similar to the ubi backend, there are github and gitlab backends.

These backends are relatively new features that exited experimental status a few months ago, and they achieve equivalent functionality without depending on ubi.

Package Manager Backends (npm/cargo/pip/gem/go, etc.)

If there is no binary distribution and installation via a package manager is possible, use the corresponding package manager backend.

These backends act as wrappers, and by installing through mise, you can keep them under mise's tool management.

Recently, the go backend has also exited experimental status, allowing Go-based CLI tools to be managed by mise as well.

http

If the above options are difficult to use, you can download and install directly from a URL using the http backend.

While its use cases can be limited, it is useful when you want to install tools distributed outside of GitHub/GitLab or standard package managers using mise.

Tool Installation Workflow

Based on the backend priority above, the general workflow for tool installation is as follows:

Workflow Diagram

Workflow Details

  1. Check tool installation method and GitHub releases
    First, check the provided installation methods and GitHub release contents. Specifically, confirm:

    • What installation methods are provided.

    • Whether binaries are provided for your specific OS/architecture in the GitHub releases.
      Note that sometimes specific GitHub releases may lack binary distributions, or only support certain OS/architectures.

    • Example
      GitHub Releases Example

  2. Check if registered in aqua
    Next, check if it is registered in aqua.

    The recommended way is to check the aqua-registry GitHub repository or use the aqua g command in your terminal.

    If it hits, install using the aqua backend.
    Example of aqua g command

  3. Check for binary distributions in GitHub releases
    If not registered in aqua and binary distributions exist in GitHub releases, install using the ubi/github backend.

  4. Install via language-specific package manager or http
    Use the language-specific package manager or http backend otherwise.

Based on this workflow, I often specify the backend explicitly for installation:

  • Example of mise.toml
[tools]
"npm:prettier"                              = "3.6.2"
"pipx:grip"                                 = "4.6.2"
"cargo:fzf-make"                            = "0.65.0"
"go:github.com/atotto/clipboard/cmd/gocopy" = "0.1.4"
"aqua:junegunn/fzf"                         = "0.67.0"
"ubi:Ryooooooga/zabrze"                     = "0.5.1"

Automating Tool Updates

While you can install tools using latest instead of specifying a version in mise, it is recommended to pin versions and automate updates. Renovate supports mise by default, so please take advantage of that.

CI Usage Example

You will likely want to use these tools in your CI environment as well. mise provides an official GitHub Action:

Configuration can be a bit tricky, but by setting it up as follows, you can read your configuration file and use the tools in CI:

  • By default, it looks for the mise.toml in the root directory and installs the versions specified there.
  • To specify tools to install, provide the tool names in install_args.
  • You can also write the contents of mise.toml directly as a string using mise_toml (though this is not recommended due to managing content in multiple places).
- uses: jdx/mise-action@d16887ba50704baed7de72bd1e82e04391e4457a # v3.5.0
  with:
    install_args: "npm:prettier"
  env:
    MISE_FETCH_REMOTE_VERSIONS_TIMEOUT: 30s

A past note: previously, network issues in CI environments sometimes caused timeouts, so I would extend the timeout via the MISE_FETCH_REMOTE_VERSIONS_TIMEOUT environment variable (from 10s to 30s). However, it seems the default value has been updated to 20s as of the commit on 2024/11/30.

Summary

I have introduced how to centrally manage CLI tools with mise.

Version management for CLI tools, not just language runtimes, is a key point for both individual and team development. I hope mise becomes a standard tool in the future.

Although I couldn't cover everything, mise has almost too many other features.

Personally, I am also paying attention to mise as a task runner.

My first impression was that including a task runner in mise seemed like taking on too many responsibilities, but after using it, I found it addresses the common frustrations with task runners often written in Makefiles, without requiring the active justification needed to introduce alternative tools like just or task. It's great that mise, which already handles runtime and CLI tool management, also serves as a task runner. (I hope to introduce this in a separate article if I have the chance.)

I hope this article helps mise become more widely used and contributes to your better CLI life.

GitHubで編集を提案

Discussion